|
C Container Collection (CCC)
|
#include <private_types.h>
The single type used to handle both forward and reverse iteration through containers. The concept is the exact same due to how we always return the full user type during iteration, regardless of the container being intrusive or not. So we use a union for some clarity for the implementer.
We will also wrap this in two different types so that the user has some help ensuring they pass the correct direction range to the correct function.
Data Fields | |
| union { | |
| void * begin | |
| void * reverse_begin | |
| }; | |
| union { | |
| void * end | |
| void * reverse_end | |
| }; | |
| void* CCC_Range::begin |
Start of forward iteration for a container.
| void* CCC_Range::end |
End of forward iteration for a container.
| void* CCC_Range::reverse_begin |
Start of reverse iteration for a container.
| void* CCC_Range::reverse_end |
End of reverse iteration for a container.