Mirror reflection library - Lagoon run-time layer 0.5.13

lagoon::range< MetaObject > Class Template Reference

The type of a range of managed pointers to the MetaObject. More...

#include <lagoon/utils.hpp>

Inheritance diagram for lagoon::range< MetaObject >:
Collaboration diagram for lagoon::range< MetaObject >:

List of all members.

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< MetaObjectat (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.

Detailed Description

template<typename MetaObject>
class lagoon::range< MetaObject >

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.


Member Function Documentation

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.


The documentation for this class 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.