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

Represents a constant mathematical mapping (f(x) = c) More...

#include <MappingUtils.h>

Inheritance diagram for inet::physicallayer::ConstantSimpleConstMapping:
inet::physicallayer::SimpleConstMapping inet::physicallayer::ConstMapping

Public Member Functions

 ConstantSimpleConstMapping (const DimensionSet &dims, argument_value_cref_t val)
 
 ConstantSimpleConstMapping (const DimensionSet &dims, const Argument &key, argument_value_cref_t val)
 
 ConstantSimpleConstMapping (const ConstantSimpleConstMapping &o)
 
virtual ~ConstantSimpleConstMapping ()
 
virtual argument_value_t getValue (const Argument &) const override
 Returns the value of this Mapping at the position specified by the passed Argument. More...
 
argument_value_cref_t getValue () const
 Returns the value of this constant mapping. More...
 
void setValue (argument_value_cref_t val)
 Sets the value of this constant mapping. More...
 
ConstMappingconstClone () const override
 returns a deep copy of this mapping instance. More...
 
- Public Member Functions inherited from inet::physicallayer::SimpleConstMapping
virtual ConstMappingIteratorcreateConstIterator () const override
 Returns a pointer of a new Iterator which is able to iterate over the Mapping. More...
 
virtual ConstMappingIteratorcreateConstIterator (const Argument &pos) const override
 Returns a pointer of a new Iterator which is able to iterate over the Mapping. More...
 
 SimpleConstMapping (const DimensionSet &dims)
 Initializes a not yet iterateable SimpleConstmapping with the passed DimensionSet as domain. More...
 
 SimpleConstMapping (const SimpleConstMapping &o)
 
SimpleConstMappingoperator= (const SimpleConstMapping &copy)
 SimpleConstMapping assignment operator. More...
 
void swap (SimpleConstMapping &s)
 Swaps data with another SimpleConstMapping. More...
 
 SimpleConstMapping (const DimensionSet &dims, const Argument &key)
 Fully initializes this mapping with the passed position as key entry. More...
 
 SimpleConstMapping (const DimensionSet &dims, const Argument &key1, const Argument &key2)
 Fully initializes this mapping with the passed two positions as key entries. More...
 
 SimpleConstMapping (const DimensionSet &dims, const Argument &min, const Argument &max, const Argument &interval)
 Fully initializes this mapping with the key entries defined by the passed min, max and interval values. More...
 
void initializeArguments (const Argument &key)
 Initializes the key entry set with the passed position as entry. More...
 
void initializeArguments (const Argument &key1, const Argument &key2)
 Initializes the key entry set with the passed two positions as entries. More...
 
void initializeArguments (const Argument &min, const Argument &max, const Argument &interval)
 Initializes the key entry set with the passed min, max and interval-Arguments. 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

argument_value_t value
 
- Protected Attributes inherited from inet::physicallayer::SimpleConstMapping
KeyEntrySet keyEntries
 A set of Arguments defining the "points of interest" an iterator should iterate over. More...
 
- Protected Attributes inherited from inet::physicallayer::ConstMapping
DimensionSet dimensions
 The dimensions of this mappings domain. More...
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::ConstMapping
typedef Argument::mapped_type argument_value_t
 
typedef Argument::mapped_type_cref argument_value_cref_t
 
- Protected Types inherited from inet::physicallayer::SimpleConstMapping
typedef std::set< ArgumentKeyEntrySet
 Type for a set of Arguments defining key entries. More...
 
- Protected Member Functions inherited from inet::physicallayer::SimpleConstMapping
void createKeyEntries (const Argument &from, const Argument &to, const Argument &step, Argument &pos)
 Utility method to fill add range of key entries in the time dimension to the key entry set. More...
 
void createKeyEntries (const Argument &from, const Argument &to, const Argument &step, DimensionSet::const_iterator curDim, Argument &pos)
 Utility method to fill add range of key entries in the passed dimension (and recursively its sub dimensions) to the key entry set. More...
 

Detailed Description

Represents a constant mathematical mapping (f(x) = c)

Returns the same value for every point in any dimension.

Author
Karl Wessel

Constructor & Destructor Documentation

inet::physicallayer::ConstantSimpleConstMapping::ConstantSimpleConstMapping ( const DimensionSet dims,
argument_value_cref_t  val 
)
inline
1215  :
1216  SimpleConstMapping(dims), value(val) {}
SimpleConstMapping(const DimensionSet &dims)
Initializes a not yet iterateable SimpleConstmapping with the passed DimensionSet as domain...
Definition: MappingBase.h:1644
argument_value_t value
Definition: MappingUtils.h:1212
inet::physicallayer::ConstantSimpleConstMapping::ConstantSimpleConstMapping ( const DimensionSet dims,
const Argument key,
argument_value_cref_t  val 
)
inline
1220  :
1221  SimpleConstMapping(dims, key), value(val) {}
SimpleConstMapping(const DimensionSet &dims)
Initializes a not yet iterateable SimpleConstmapping with the passed DimensionSet as domain...
Definition: MappingBase.h:1644
argument_value_t value
Definition: MappingUtils.h:1212
inet::physicallayer::ConstantSimpleConstMapping::ConstantSimpleConstMapping ( const ConstantSimpleConstMapping o)
inline
1223  :
1224  SimpleConstMapping(o), value(o.value) {}
SimpleConstMapping(const DimensionSet &dims)
Initializes a not yet iterateable SimpleConstmapping with the passed DimensionSet as domain...
Definition: MappingBase.h:1644
argument_value_t value
Definition: MappingUtils.h:1212
virtual inet::physicallayer::ConstantSimpleConstMapping::~ConstantSimpleConstMapping ( )
inlinevirtual
1226 {}

Member Function Documentation

ConstMapping* inet::physicallayer::ConstantSimpleConstMapping::constClone ( ) const
inlineoverridevirtual

returns a deep copy of this mapping instance.

Implements inet::physicallayer::ConstMapping.

1247  {
1249  }
DimensionSet dimensions
The dimensions of this mappings domain.
Definition: MappingBase.h:879
ConstantSimpleConstMapping(const DimensionSet &dims, argument_value_cref_t val)
Definition: MappingUtils.h:1215
argument_value_t value
Definition: MappingUtils.h:1212
virtual argument_value_t inet::physicallayer::ConstantSimpleConstMapping::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.

Referenced by inet::physicallayer::MultiDimMapping< Linear >::createSubSignal().

1229  {
1230  return value;
1231  }
argument_value_t value
Definition: MappingUtils.h:1212
argument_value_cref_t inet::physicallayer::ConstantSimpleConstMapping::getValue ( ) const
inline

Returns the value of this constant mapping.

1237  {
1238  return value;
1239  }
argument_value_t value
Definition: MappingUtils.h:1212
void inet::physicallayer::ConstantSimpleConstMapping::setValue ( argument_value_cref_t  val)
inline

Sets the value of this constant mapping.

1244 { value = val; }
argument_value_t value
Definition: MappingUtils.h:1212

Member Data Documentation

argument_value_t inet::physicallayer::ConstantSimpleConstMapping::value
protected

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