INET Framework for OMNeT++/OMNEST
|
Specifies a dimension for mappings (like time, frequency, etc.) More...
#include <MappingBase.h>
Public Member Functions | |
Dimension () | |
Dimension (const char *name, int id) | |
Creates a new dimension instance representing the dimension with the passed name. More... | |
bool | operator== (const Dimension &other) const |
Returns true if the ids of the two dimensions are equal. More... | |
bool | operator< (const Dimension &other) const |
Returns true if the id of the other dimension is greater then the id of this dimension. More... | |
bool | operator<= (const Dimension &other) const |
Sorting operator by dimension ID. More... | |
bool | operator> (const Dimension &other) const |
Sorting operator by dimension ID. More... | |
bool | operator>= (const Dimension &other) const |
Sorting operator by dimension ID. More... | |
bool | operator!= (const Dimension &other) const |
Sorting operator by dimension ID. More... | |
const char * | getName () const |
Returns the name of this dimension. More... | |
int | getID () const |
Returns the unique id of the dimension this instance represents. More... | |
Static Public Attributes | |
static const Dimension | time |
Shortcut to the time Dimension, same as 'Dimension("time")', but spares the parsing of a string. More... | |
static const Dimension | frequency |
Shortcut to the frequency Dimension, same as 'Dimension("frequency")', but spares the parsing of a string. More... | |
Protected Attributes | |
const char * | name = nullptr |
The unique name of the dimension this instance represents. More... | |
int | id = 0 |
The unique id of the dimension this instance represents. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Dimension &d) |
Output operator for a dimension. More... | |
Specifies a dimension for mappings (like time, frequency, etc.)
The dimension is represented external by a string (like "time") and internally by an unique ID.
Note: Since the ID for a Dimensions is set the first time an instance of this dimensions is created and the id is used to provide a defined ordering of the Dimensions it DOES matter which dimensions are instantiated the first time. Only the time dimension will always have zero as unique id.
inet::physicallayer::Dimension::Dimension | ( | const char * | name, |
int | id | ||
) |
Creates a new dimension instance representing the dimension with the passed name.
|
inline |
Returns the unique id of the dimension this instance represents.
The id is used to uniquely identify dimensions as well as to provide a sorting of dimensions. Note: The "time"-dimension will always have the ID zero.
|
inline |
Returns the name of this dimension.
|
inline |
|
inline |
Returns true if the id of the other dimension is greater then the id of this dimension.
This is needed to be able to use Dimension as a key in std::map.
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
static |
Shortcut to the frequency Dimension, same as 'Dimension("frequency")', but spares the parsing of a string.
Referenced by inet::physicallayer::DimensionalNoise::computeMaxPower(), inet::physicallayer::DimensionalSNIR::computeMin(), inet::physicallayer::DimensionalReception::computeMinPower(), inet::physicallayer::DimensionalSignalAnalogModel::computeMinPower(), inet::physicallayer::DimensionalAnalogModelBase::computeNoise(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::computeNoise(), inet::physicallayer::DimensionalAnalogModelBase::computeReceptionPower(), inet::physicallayer::FrequencyMapping< Interpolator >::createIterator(), inet::physicallayer::MappingUtils::createMapping(), inet::physicallayer::DimensionalTransmitterBase::createPowerMapping(), Dimension(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::FrequencyMappingIterator(), inet::physicallayer::FrequencyMapping< Interpolator >::getValue(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::initialize(), inet::physicallayer::DimensionalTransmitterBase::initialize(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::iterateTo(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::jumpTo(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::jumpToBegin(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::next(), inet::physicallayer::FrequencyMapping< Interpolator >::setValue(), and inet::physicallayer::FrequencyMappingIterator< Interpolator >::updateNextPos().
|
protected |
The unique id of the dimension this instance represents.
Referenced by operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
|
protected |
The unique name of the dimension this instance represents.
|
static |
Shortcut to the time Dimension, same as 'Dimension("time")', but spares the parsing of a string.
Referenced by inet::physicallayer::Argument::compare(), inet::physicallayer::DimensionalNoise::computeMaxPower(), inet::physicallayer::DimensionalSNIR::computeMin(), inet::physicallayer::DimensionalReception::computeMinPower(), inet::physicallayer::DimensionalSignalAnalogModel::computeMinPower(), inet::physicallayer::DimensionalAnalogModelBase::computeNoise(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::computeNoise(), inet::physicallayer::DimensionalAnalogModelBase::computeReceptionPower(), inet::physicallayer::MultiDimMapping< Linear >::copySubMappings(), inet::physicallayer::SimpleConstMapping::createKeyEntries(), inet::physicallayer::MappingUtils::createMapping(), inet::physicallayer::DimensionalTransmitterBase::createPowerMapping(), inet::physicallayer::MultiDimMapping< Linear >::createSubSignal(), inet::physicallayer::FilledUpMapping::createSubSignal(), Dimension(), inet::physicallayer::Argument::find(), inet::physicallayer::Argument::getDimensions(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::initialize(), inet::physicallayer::DimensionalTransmitterBase::initialize(), inet::physicallayer::SimpleConstMapping::initializeArguments(), inet::physicallayer::Argument::lower_bound(), inet::physicallayer::ConstMapping::print(), and inet::physicallayer::Argument::setArgValue().