INET Framework for OMNeT++/OMNEST
inet::physicallayer::ConstMappingWrapper Class Reference

Wraps an ConstMapping into a Mapping interface. More...

#include <MappingUtils.h>

Inheritance diagram for inet::physicallayer::ConstMappingWrapper:
inet::physicallayer::Mapping inet::physicallayer::ConstMapping

Public Member Functions

 ConstMappingWrapper (const ConstMapping *m)
 
 ConstMappingWrapper (const ConstMappingWrapper &o)
 
virtual ~ConstMappingWrapper ()
 
virtual void setValue (const Argument &, argument_value_cref_t) override
 Changes the value of the Mapping at the specified position. More...
 
virtual MappingIteratorcreateIterator () override
 Returns a pointer of a new Iterator which is able to iterate over the Mapping and can change it. More...
 
virtual MappingIteratorcreateIterator (const Argument &pos) override
 Returns a pointer of a new Iterator which is able to iterate over the function and can change it. More...
 
virtual argument_value_t getValue (const Argument &pos) const override
 Returns the value of this Mapping at the position specified by the passed Argument. More...
 
virtual ConstMappingIteratorcreateConstIterator () const override
 Returns an ConstMappingIterator by use of the respective implementation of the "createIterator()"-method. More...
 
virtual ConstMappingIteratorcreateConstIterator (const Argument &pos) const override
 Returns an ConstMappingIterator by use of the respective implementation of the "createIterator()"-method. More...
 
virtual ConstMappingconstClone () const override
 Returns a deep const copy of this mapping by using the according "clone()"-implementation. More...
 
virtual Mappingclone () const override
 Returns a deep copy of this Mapping. More...
 
- Public Member Functions inherited from inet::physicallayer::Mapping
Mappingoperator= (const Mapping &copy)
 Mapping assignment operator. More...
 
void swap (Mapping &s)
 Swaps data with another Mapping. More...
 
 Mapping (const DimensionSet &dims)
 Initializes the Mapping with the passed DimensionSet as domain. More...
 
 Mapping ()
 Initializes the Mapping with the time dimension as domain. More...
 
 Mapping (const Mapping &o)
 
virtual ~Mapping ()
 
virtual void appendValue (const Argument &pos, argument_value_cref_t value)
 Appends the passed value at the passed position to the mapping. More...
 
- Public Member Functions inherited from inet::physicallayer::ConstMapping
ConstMappingoperator= (const ConstMapping &copy)
 ConstMapping assignment operator. More...
 
void swap (ConstMapping &s)
 Swaps data with another ConstMapping. More...
 
 ConstMapping ()
 Initializes the ConstMapping with a the time dimension as domain. More...
 
 ConstMapping (const ConstMapping &o)
 
 ConstMapping (const DimensionSet &dimSet)
 Initializes the ConstMapping with the passed DimensionSet as Domain. More...
 
virtual ~ConstMapping ()
 
argument_value_t operator[] (const Argument &pos) const
 Returns the value of this Mapping at the position specified by the passed Argument. More...
 
const DimensionSetgetDimensionSet () const
 Returns this Mappings domain as DimensionSet. More...
 
template<class stream >
stream & print (stream &out, argument_value_cref_t lTimeScale=argument_value_t(1), argument_value_cref_t lLeftColScale=Argument::MappedOne, const std::string &sTableHead=std::string("o\\ms"), const Dimension *const pOnlyDim=nullptr) const
 Prints the Mapping to an output stream. More...
 

Protected Attributes

const ConstMappingmapping
 
- Protected Attributes inherited from inet::physicallayer::ConstMapping
DimensionSet dimensions
 The dimensions of this mappings domain. More...
 

Private Member Functions

ConstMappingWrapperoperator= (const ConstMappingWrapper &)
 Assignment operator is not allowed. More...
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::Mapping
enum  InterpolationMethod { STEPS, NEAREST, LINEAR }
 Types of interpolation methods for mappings. More...
 
- Public Types inherited from inet::physicallayer::ConstMapping
typedef Argument::mapped_type argument_value_t
 
typedef Argument::mapped_type_cref argument_value_cref_t
 

Detailed Description

Wraps an ConstMapping into a Mapping interface.

Assumes that "setValue()" of the Mapping interface will never be called.

Author
Karl Wessel

Constructor & Destructor Documentation

inet::physicallayer::ConstMappingWrapper::ConstMappingWrapper ( const ConstMapping m)
inline
1326  :
1327  Mapping(m->getDimensionSet()), mapping(m) {}
const ConstMapping * mapping
Definition: MappingUtils.h:1318
Mapping()
Initializes the Mapping with the time dimension as domain.
Definition: MappingBase.h:1299
value< double, units::m > m
Definition: Units.h:1047
inet::physicallayer::ConstMappingWrapper::ConstMappingWrapper ( const ConstMappingWrapper o)
inline
1328  :
1329  Mapping(o), mapping(o.mapping) {}
const ConstMapping * mapping
Definition: MappingUtils.h:1318
Mapping()
Initializes the Mapping with the time dimension as domain.
Definition: MappingBase.h:1299
virtual inet::physicallayer::ConstMappingWrapper::~ConstMappingWrapper ( )
inlinevirtual
1331 {}

Member Function Documentation

virtual Mapping* inet::physicallayer::ConstMappingWrapper::clone ( ) const
inlineoverridevirtual

Returns a deep copy of this Mapping.

Implements inet::physicallayer::Mapping.

1360  {
1361  return new ConstMappingWrapper(mapping->constClone());
1362  }
const ConstMapping * mapping
Definition: MappingUtils.h:1318
ConstMappingWrapper(const ConstMapping *m)
Definition: MappingUtils.h:1326
virtual ConstMapping * constClone() const =0
returns a deep copy of this mapping instance.
virtual ConstMapping* inet::physicallayer::ConstMappingWrapper::constClone ( ) const
inlineoverridevirtual

Returns a deep const copy of this mapping by using the according "clone()"-implementation.

Reimplemented from inet::physicallayer::Mapping.

1357 { return mapping->constClone(); }
const ConstMapping * mapping
Definition: MappingUtils.h:1318
virtual ConstMapping * constClone() const =0
returns a deep copy of this mapping instance.
virtual ConstMappingIterator* inet::physicallayer::ConstMappingWrapper::createConstIterator ( ) const
inlineoverridevirtual

Returns an ConstMappingIterator by use of the respective implementation of the "createIterator()"-method.

Override this method if your ConstIterator differs from the normal iterator.

Reimplemented from inet::physicallayer::Mapping.

1348  {
1349  return mapping->createConstIterator();
1350  }
const ConstMapping * mapping
Definition: MappingUtils.h:1318
virtual ConstMappingIterator * createConstIterator() const =0
Returns a pointer of a new Iterator which is able to iterate over this Mapping.
virtual ConstMappingIterator* inet::physicallayer::ConstMappingWrapper::createConstIterator ( const Argument pos) const
inlineoverridevirtual

Returns an ConstMappingIterator by use of the respective implementation of the "createIterator()"-method.

Override this method if your ConstIterator differs from the normal iterator.

Reimplemented from inet::physicallayer::Mapping.

1353  {
1354  return mapping->createConstIterator(pos);
1355  }
const ConstMapping * mapping
Definition: MappingUtils.h:1318
virtual ConstMappingIterator * createConstIterator() const =0
Returns a pointer of a new Iterator which is able to iterate over this Mapping.
virtual MappingIterator* inet::physicallayer::ConstMappingWrapper::createIterator ( )
inlineoverridevirtual

Returns a pointer of a new Iterator which is able to iterate over the Mapping and can change it.

Implements inet::physicallayer::Mapping.

1336  {
1337  return new ConstMappingIteratorWrapper(mapping->createConstIterator());
1338  }
const ConstMapping * mapping
Definition: MappingUtils.h:1318
virtual ConstMappingIterator * createConstIterator() const =0
Returns a pointer of a new Iterator which is able to iterate over this Mapping.
virtual MappingIterator* inet::physicallayer::ConstMappingWrapper::createIterator ( const Argument pos)
inlineoverridevirtual

Returns a pointer of a new Iterator which is able to iterate over the function and can change it.

The iterator starts at the passed position.

Implements inet::physicallayer::Mapping.

1341  {
1342  return new ConstMappingIteratorWrapper(mapping->createConstIterator(pos));
1343  }
const ConstMapping * mapping
Definition: MappingUtils.h:1318
virtual ConstMappingIterator * createConstIterator() const =0
Returns a pointer of a new Iterator which is able to iterate over this Mapping.
virtual argument_value_t inet::physicallayer::ConstMappingWrapper::getValue ( const Argument pos) const
inlineoverridevirtual

Returns the value of this Mapping at the position specified by the passed Argument.

The complexity of this method depends on the actual implementation.

Implements inet::physicallayer::ConstMapping.

1345 { return mapping->getValue(pos); }
const ConstMapping * mapping
Definition: MappingUtils.h:1318
virtual argument_value_t getValue(const Argument &pos) const =0
Returns the value of this Mapping at the position specified by the passed Argument.
ConstMappingWrapper& inet::physicallayer::ConstMappingWrapper::operator= ( const ConstMappingWrapper )
private

Assignment operator is not allowed.

virtual void inet::physicallayer::ConstMappingWrapper::setValue ( const Argument pos,
argument_value_cref_t  value 
)
inlineoverridevirtual

Changes the value of the Mapping at the specified position.

The complexity of this method depends on the implementation.

Implements inet::physicallayer::Mapping.

1333 { assert(false); }

Member Data Documentation

const ConstMapping* inet::physicallayer::ConstMappingWrapper::mapping
protected

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