|
Project Euler Solutions
|
The reference struct for all iterators in this project. More...
#include <iterator.h>


Public Member Functions | |
| counter | count_by (uintmax_t start, uintmax_t stop, intmax_t step) |
| The base constructor for the counter iterator. More... | |
| counter | count_in_range (uintmax_t start, uintmax_t stop) |
| The simpler constructor for the counter iterator. More... | |
| counter | count_to (uintmax_t stop) |
| The simplest constructor for the counter iterator. More... | |
Public Attributes | |
| uintmax_t | idx |
| The current position of the counter. More... | |
| uintmax_t | stop |
| The value before which the counter will stop. More... | |
| intmax_t | step |
| The amount by which the counter will move. More... | |
Public Attributes inherited from c::include::iterator::Iterator | |
| bool | exhausted: 1 |
| An indicator that the iterator has stopped. More... | |
| bool | started: 1 |
| An indicator that the iterator has started. More... | |
| bool | phase: 1 |
| An indicator that changes each time the iterator moves. More... | |
Private Member Functions | |
| static uintmax_t | iterate_counter (counter *i) |
| The function to advance a counter. More... | |
Private Attributes | |
| uintmax_t(*const | iterator_function )(counter *it) |
| The pointer to the iteration function. More... | |
| void(*const | destructor )(void *it) |
| The pointer to the destructor function. More... | |
Additional Inherited Members | |
Related Functions inherited from c::include::iterator::Iterator | |
| #define | IteratorTail(return_type, struct_type) |
| The base definition macro for all iterators in this project. More... | |
| #define | IterationHead(it) |
| The base macro for all iteration functions in this project. More... | |
| #define | IteratorInitHead(advance, ...) {.iterator_function = &advance, AddDestructor(no_destructor), __VA_ARGS__} |
| The base macro for all iterator initialization functions in this project. More... | |
| #define | AddDestructor(func) ExtendInit(destructor, (void (*const)(void *)) &func) |
| The extension macro for initializing Iterators with a destructor. More... | |
| #define | ExtendInit(name, value) .name = value |
| The extension macro for initializing more complicated Iterators. More... | |
| #define | next(state) (*(state.iterator_function))(&state) |
| The macro to advance generic iterators. More... | |
| #define | next_p(state) (*(state->iterator_function))(state) |
| The macro to advance generic iterator pointers. More... | |
| #define | free_iterator(it) (*(it.destructor))(&it) |
| The generic destructor for iterators. More... | |
| #define | free_iterator_p(it) (*(it->destructor))(it) |
| The generic destructor for iterator pointers. More... | |
The reference struct for all iterators in this project.
| counter count_by | ( | uintmax_t | start, |
| uintmax_t | stop, | ||
| intmax_t | step | ||
| ) |
The base constructor for the counter iterator.
| start | The beginning position of the counter |
| stop | The point where the counter is exhausted |
| step | The amount to step by each time you iterate the counter |
| counter count_in_range | ( | uintmax_t | start, |
| uintmax_t | stop | ||
| ) |
The simpler constructor for the counter iterator.
| start | The beginning position of the counter |
| stop | The point where the counter is exhausted |
| counter count_to | ( | uintmax_t | stop | ) |
The simplest constructor for the counter iterator.
| stop | The point where the counter is exhausted |
|
private |
The function to advance a counter.
| i | the counter you want to advance |
|
private |
The pointer to the destructor function.
| uintmax_t c::include::iterator::counter::idx |
The current position of the counter.
|
private |
The pointer to the iteration function.
| intmax_t c::include::iterator::counter::step |
The amount by which the counter will move.
| uintmax_t c::include::iterator::counter::stop |
The value before which the counter will stop.
1.8.11