Mirror reflection library - Lagoon run-time layer 0.5.13
|
The type of a range of managed pointers to the MetaObject. More...
#include <lagoon/utils.hpp>
Public Member Functions | |
range (const iterator &b, const iterator &e) | |
bool | empty (void) const |
Returns true if the range is empty. | |
size_t | size (void) const |
Returns the size of the range i.e. the number of items. | |
void | step_front (void) |
Moves the front of the range one item forward. | |
size_t | leap_front (size_t leap) |
Moves the front of the range n items forward. | |
const shared< MetaObject > & | front (void) const |
Returns the (pointer to the) item at the front of the range. | |
shared< MetaObject > | at (size_t offs) const |
Returns the (pointer to the) item offs steps from the front. | |
Protected Attributes | |
iterator | current |
iterator | end |
Friends | |
bool | same_position (const range_base &a, const range_base &b) |
Checks if the front of both ranges points to the same elem. |
The type of a range of managed pointers to the MetaObject.
This type should be used when dealing with a set or range of managed meta-objects. This class allows to do forward traversals of the range.
size_t lagoon::range_base< MetaObject, std::vector< shared< MetaObject > >::const_iterator >::leap_front | ( | size_t | leap | ) | [inline, inherited] |
Moves the front of the range n items forward.
This member function moves the front of the range leap items forward. The leap parameter may be greater than size() resulting in an empty range. Returns the number of items actually leaped through.