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

A simple constant mapping for one value over time. More...

#include <SimpleTimeConstMapping.h>

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

Public Member Functions

 SimpleTimeConstMapping (double _myValue, simtime_t_cref _start, simtime_t_cref _stop)
 Constructs the mapping with the value _myValue, in the time interval [start, stop]. More...
 
virtual ~SimpleTimeConstMapping ()
 
double getValue (const Argument &) const
 Returns a constant. More...
 
ConstMappingconstClone () const
 creates a clone of this mapping. 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

double myValue
 
simtime_t start
 
simtime_t stop
 
- 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

A simple constant mapping for one value over time.

Constructor & Destructor Documentation

inet::physicallayer::SimpleTimeConstMapping::SimpleTimeConstMapping ( double  _myValue,
simtime_t_cref  _start,
simtime_t_cref  _stop 
)
inline

Constructs the mapping with the value _myValue, in the time interval [start, stop].

46  : SimpleConstMapping(DimensionSet(Dimension::time))
47  , myValue(_myValue)
48  , start(_start)
49  , stop(_stop)
50  {
51  initializeArguments(Argument(_start), Argument(_stop), Argument(1));
52  }
static const Dimension time
Shortcut to the time Dimension, same as &#39;Dimension("time")&#39;, but spares the parsing of a string...
Definition: MappingBase.h:64
void initializeArguments(const Argument &key)
Initializes the key entry set with the passed position as entry.
Definition: MappingBase.h:1719
simtime_t stop
Definition: SimpleTimeConstMapping.h:39
simtime_t start
Definition: SimpleTimeConstMapping.h:39
double myValue
Definition: SimpleTimeConstMapping.h:38
SimpleConstMapping(const DimensionSet &dims)
Initializes a not yet iterateable SimpleConstmapping with the passed DimensionSet as domain...
Definition: MappingBase.h:1644
virtual inet::physicallayer::SimpleTimeConstMapping::~SimpleTimeConstMapping ( )
inlinevirtual
54 {}

Member Function Documentation

ConstMapping* inet::physicallayer::SimpleTimeConstMapping::constClone ( ) const
inlinevirtual

creates a clone of this mapping.

Implements inet::physicallayer::ConstMapping.

65  {
67  }
simtime_t stop
Definition: SimpleTimeConstMapping.h:39
SimpleTimeConstMapping(double _myValue, simtime_t_cref _start, simtime_t_cref _stop)
Constructs the mapping with the value _myValue, in the time interval [start, stop].
Definition: SimpleTimeConstMapping.h:45
simtime_t start
Definition: SimpleTimeConstMapping.h:39
double myValue
Definition: SimpleTimeConstMapping.h:38
double inet::physicallayer::SimpleTimeConstMapping::getValue ( const Argument ) const
inlinevirtual

Returns a constant.

Implements inet::physicallayer::ConstMapping.

59 { return myValue; }
double myValue
Definition: SimpleTimeConstMapping.h:38

Member Data Documentation

double inet::physicallayer::SimpleTimeConstMapping::myValue
protected
simtime_t inet::physicallayer::SimpleTimeConstMapping::start
protected
simtime_t inet::physicallayer::SimpleTimeConstMapping::stop
protected

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