Mirror reflection library 0.5.13
|
Structure providing info about a simplified element traversal. More...
#include <mirror/meta_container.hpp>
Public Member Functions | |
const int | elements_done (void) const |
Returns the count of already processed elements. | |
const int | container_index (void) const |
Returns the container index. | |
const bool | first_container (void) const |
Returns true if the element belongs to the first container. | |
const bool | last_container (void) const |
Returns true if the element belongs to the last container. | |
const int | element_position (void) const |
Returns the position of the current element in the container. | |
const bool | first_in_container (void) const |
Returns true if the current element is the first in the container. | |
const bool | last_in_container (void) const |
Returns true if the current element is the last in the container. | |
Public Attributes | |
int | _elem_done |
int | _cntnr_idx |
int | _elem_idx |
bool | _first_cntnr |
bool | _last_cntnr |
bool | _first_elem |
bool | _last_elem |
Structure providing info about a simplified element traversal.
Instances of this structure are used to provide info about the currently traversed element to an application specified functor during a simplified element traversal by the traverse_elements
function.
const int mirror::element_traversal_info::container_index | ( | void | ) | const [inline] |
Returns the container index.
This function returns the index of the container that the currently traversed element belongs to. This function returns zero for the simple and the single-value containers.
const int mirror::element_traversal_info::elements_done | ( | void | ) | const [inline] |
Returns the count of already processed elements.
This function returns the count of element which have already been processed during this traversal not including the current element. i.e. for the first element this value is zero