INET Framework for OMNeT++/OMNEST
inet::physicallayer::ConstMappingIterator Class Referenceabstract

Defines an const iterator for a ConstMapping which is able to iterate over the Mapping. More...

#include <MappingBase.h>

Inheritance diagram for inet::physicallayer::ConstMappingIterator:
inet::physicallayer::MappingIterator inet::physicallayer::SimpleConstMappingIterator inet::physicallayer::BaseFilteredIterator< MappingIterator > inet::physicallayer::ConstMappingIteratorWrapper inet::physicallayer::FrequencyMappingIterator< Interpolator > inet::physicallayer::LinearIntplMappingIterator inet::physicallayer::MultiDimMappingIterator< Interpolator > inet::physicallayer::TimeMappingIterator< Interpolator > inet::physicallayer::MultiDimMappingIterator< Linear > inet::physicallayer::FilteredMappingIterator inet::physicallayer::FilledUpMappingIterator

Public Types

typedef Argument::mapped_type argument_value_t
 
typedef Argument::mapped_type_cref argument_value_cref_t
 

Public Member Functions

 ConstMappingIterator ()
 
virtual ~ConstMappingIterator ()
 
 ConstMappingIterator (const ConstMappingIterator &)
 Copy constructor. More...
 
ConstMappingIteratoroperator= (const ConstMappingIterator &)
 ConstMappingIterator assignment operator. More...
 
void swap (ConstMappingIterator &)
 Swaps data with another ConstMappingIterator. More...
 
virtual const ArgumentgetNextPosition () const =0
 Returns the position the next call to "next()" of this Iterator would iterate to. More...
 
virtual void jumpTo (const Argument &pos)=0
 Lets the iterator point to the passed position. More...
 
virtual void jumpToBegin ()=0
 Lets the iterator point to the begin of the mapping. More...
 
virtual void iterateTo (const Argument &pos)=0
 Iterates to the specified position. More...
 
virtual void next ()=0
 Iterates to the next position of the Mapping. More...
 
virtual bool inRange () const =0
 Returns true if the current position of the iterator is in range of the function. More...
 
virtual bool hasNext () const =0
 Returns true if the iterator has a next value it can iterate to on a call to "next()". More...
 
virtual const ArgumentgetPosition () const =0
 Returns the current position of the iterator. More...
 
virtual argument_value_t getValue () const =0
 Returns the value of the Mapping at the current position. More...
 

Detailed Description

Defines an const iterator for a ConstMapping which is able to iterate over the Mapping.

Iterators provide a fast way to iterate over every "entry" or important position of a Mapping. They also provide constant complexity for accessing the Mapping at the position of the Iterator.

Every implementation of an mapping-Iterator provides the same ordering when iterating over a Mapping. This is that, if the iterator is increased, the position of the entry it points to has to be also "increased". Which means that the new position has to be compared bigger than the previous position (see class Argument for comparison of positions).

"Const" means that you can not change the values of the underlying Mapping with this iterator.

Author
Karl Wessel

Member Typedef Documentation

Constructor & Destructor Documentation

inet::physicallayer::ConstMappingIterator::ConstMappingIterator ( )
inline
725 {}
virtual inet::physicallayer::ConstMappingIterator::~ConstMappingIterator ( )
inlinevirtual
726 {}
inet::physicallayer::ConstMappingIterator::ConstMappingIterator ( const ConstMappingIterator )
inline

Copy constructor.

731 {}

Member Function Documentation

virtual const Argument& inet::physicallayer::ConstMappingIterator::getPosition ( ) const
pure virtual
virtual void inet::physicallayer::ConstMappingIterator::jumpToBegin ( )
pure virtual
ConstMappingIterator& inet::physicallayer::ConstMappingIterator::operator= ( const ConstMappingIterator )
inline

ConstMappingIterator assignment operator.

Parameters
copyA ConstMappingIterator of identical element and allocator types.

All the elements of copy are copied.

739 { return *this; }
void inet::physicallayer::ConstMappingIterator::swap ( ConstMappingIterator )
inline

Swaps data with another ConstMappingIterator.

Parameters
sA ConstMappingIterator of the same element and allocator types.

This exchanges the elements between two ConstMappingIterator's in constant time. Note that the global std::swap() function is specialized such that std::swap(s1,s2) will feed to this function.

749 {}

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