Mirror reflection library 0.5.13

mirror::element_traversal_info Struct Reference

Structure providing info about a simplified element traversal. More...

#include <mirror/meta_container.hpp>

List of all members.

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

Detailed Description

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.

See also:
MetaType
traverse_elements

Member Function Documentation

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


The documentation for this struct was generated from the following file:

Copyright © 2006-2011 Matus Chochlik, University of Zilina, Zilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Fri Dec 16 2011 by Doxygen (version 1.7.3).
Important note: Although the 'boostified' version of Mirror uses the Boost C++ libraries Coding Guidelines and is implemented inside of the boost namespace, it IS NOT an officially reviewed and accepted Boost library. Mirror is being developed with the intention to be submitted for review for inclusion to the Boost C++ libraries.