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

Defines an argument for a mapping. More...

#include <MappingBase.h>

Classes

class  key_iterator
 

Public Types

typedef DimensionSet::value_type key_type
 
typedef double mapped_type
 
typedef mapped_type mapped_type_cref
 
typedef container_type::iterator iterator
 Iterator type for this set. More...
 
typedef container_type::const_iterator const_iterator
 Const-iterator type for this set. More...
 

Public Member Functions

 Argument (simtime_t_cref timeVal=SIMTIME_ZERO)
 Initialize this argument with the passed value for the time dimension. More...
 
 Argument (const DimensionSet &dims, simtime_t_cref timeVal=SIMTIME_ZERO)
 Initializes the Argument with the dimensions of the passed DimensionSet set to zero, and the passed value for the time (or zero, if omitted). More...
 
simtime_t_cref getTime () const
 Returns the time value of this argument. More...
 
void setTime (simtime_t_cref time)
 Changes the time value of this argument. More...
 
bool hasArgVal (const Argument::key_type &dim) const
 Returns true if this Argument has a value for the passed Dimension. More...
 
mapped_type_cref getArgValue (const Argument::key_type &dim) const
 Returns the value for the specified dimension. More...
 
void setArgValue (const Argument::key_type &dim, Argument::mapped_type_cref value)
 Changes the value for the specified dimension. More...
 
void setArgValues (const Argument &o, bool ignoreUnknown=false)
 Update the values of this Argument with the values of the passed Argument. More...
 
bool isSamePosition (const Argument &other) const
 Returns true if the passed Argument points to the same position. More...
 
bool operator== (const Argument &o) const
 Two Arguments are compared equal if they have the same dimensions and the same values. More...
 
bool isClose (const Argument &o, Argument::mapped_type_cref epsilon=Argument::mapped_type(0.000001)) const
 Two Arguments are compared close if they have the same dimensions and their values don't differ more then a specific epsilon. More...
 
bool operator< (const Argument &o) const
 Returns true if this Argument is smaller then the passed Argument. More...
 
int compare (const Argument &o, const DimensionSet *const dims=nullptr) const
 Compares this Argument with the passed Argument in the dimensions of the passed DimensionsSet. More...
 
DimensionSet getDimensions () const
 Returns the dimensions this argument is defined over. More...
 
Argumentoperator= (const Argument &o)
 Fast implementation of the copy-operator then the default implementation. More...
 
iterator begin ()
 Returns an iterator to the first argument value in this Argument. More...
 
const_iterator begin () const
 Returns an iterator to the first argument value in this Argument. More...
 
iterator end ()
 Returns an iterator to the value behind the last argument value. More...
 
const_iterator end () const
 Returns an iterator to the value behind the last argument value. More...
 
iterator find (const Argument::key_type &dim)
 Returns an iterator to the Argument value for the passed Dimension. More...
 
const_iterator find (const Argument::key_type &dim) const
 Returns an iterator to the Argument value for the passed Dimension. More...
 
iterator lower_bound (const Argument::key_type &dim)
 Returns an iterator to the first Argument value which dimension compares greater or equal to the passed Dimension. More...
 
const_iterator lower_bound (const Argument::key_type &dim) const
 Returns an iterator to the first Argument value which dimension compares greater or equal to the passed Dimension. More...
 

Static Public Attributes

static const mapped_type MappedZero = Argument::mapped_type(0)
 Zero value of a Argument value. More...
 
static const mapped_type MappedOne = Argument::mapped_type(1)
 One value of a Argument value. More...
 

Protected Types

typedef std::map< key_type, mapped_typecontainer_type
 
typedef container_type::value_type value_type
 

Protected Member Functions

iterator insertValue (iterator pos, const Argument::value_type &valPair, iterator &itEnd, bool ignoreUnknown=false)
 Inserts the passed value for the passed Dimension into this Argument. More...
 

Protected Attributes

simtime_t time
 Stores the time dimension in Omnet's time type. More...
 
container_type values
 Maps the dimensions of this Argument to their values. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const Argument &d)
 Output operator for Arguments. More...
 

Detailed Description

Defines an argument for a mapping.

Defines values for a specified set of dimensions, but at least for the time dimension.

Note: Currently an Argument can be maximal defined over ten Dimensions plus the time dimension!

Author
Karl Wessel

Member Typedef Documentation

typedef container_type::const_iterator inet::physicallayer::Argument::const_iterator

Const-iterator type for this set.

typedef container_type::iterator inet::physicallayer::Argument::iterator

Iterator type for this set.

typedef container_type::value_type inet::physicallayer::Argument::value_type
protected

Constructor & Destructor Documentation

inet::physicallayer::Argument::Argument ( simtime_t_cref  timeVal = SIMTIME_ZERO)

Initialize this argument with the passed value for the time dimension.

43  :
44  time(timeVal), values()
45 {
46 }
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
simtime_t time
Stores the time dimension in Omnet&#39;s time type.
Definition: MappingBase.h:435
inet::physicallayer::Argument::Argument ( const DimensionSet dims,
simtime_t_cref  timeVal = SIMTIME_ZERO 
)

Initializes the Argument with the dimensions of the passed DimensionSet set to zero, and the passed value for the time (or zero, if omitted).

48  :
49  time(timeVal), values()
50 {
51  DimensionSet::const_iterator it = dims.begin();
52  const DimensionSet::const_iterator itEnd = dims.end();
53 
54  for (++it; it != itEnd; ++it) {
56  }
57 }
static const mapped_type MappedZero
Zero value of a Argument value.
Definition: MappingBase.h:427
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
simtime_t time
Stores the time dimension in Omnet&#39;s time type.
Definition: MappingBase.h:435
container_type::value_type value_type
Definition: MappingBase.h:433
_Base::const_iterator const_iterator
Definition: MappingBase.h:153

Member Function Documentation

iterator inet::physicallayer::Argument::begin ( )
inline

Returns an iterator to the first argument value in this Argument.

Referenced by inet::physicallayer::MappingUtils::findMax(), inet::physicallayer::MappingUtils::findMin(), isClose(), isSamePosition(), inet::physicallayer::ConstMapping::print(), and setArgValues().

643 { return values.begin(); }
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
const_iterator inet::physicallayer::Argument::begin ( ) const
inline

Returns an iterator to the first argument value in this Argument.

647 { return values.begin(); }
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
int inet::physicallayer::Argument::compare ( const Argument o,
const DimensionSet *const  dims = nullptr 
) const

Compares this Argument with the passed Argument in the dimensions of the passed DimensionsSet.

(Every other Dimension is asserted equal).

Returns
< 0 - passed Argument is bigger = 0 - Arguments are equal > 0 - passed Argument is smaller

See "operator<" for definition of smaller, equal and bigger.

Referenced by inet::physicallayer::MappingUtils::findMin(), operator<(), and operator==().

243 {
245  if (dims != nullptr)
246  DimItLast = dims->end();
247  const DimensionSet::const_iterator DimItEnd = DimItLast;
248 
249  const container_type::const_reverse_iterator rItEnd = values.rend();
250  const container_type::const_iterator itEndO = o.values.end();
251  container_type::const_reverse_iterator rIt;
252  container_type::const_iterator itO;
253  bool bDidCompare = false;
254 
255  //iterate through passed dimensions and compare arguments in these dimensions
256  for (container_type::const_reverse_iterator rIt = values.rbegin(); rIt != rItEnd; ++rIt) {
257  bool bMissedDimsEntry = false;
258 
259  if (dims != nullptr) {
260  DimensionSet::const_iterator DimItCurr = dims->find(rIt->first);
261  if (DimItCurr == DimItEnd) {
262  continue;
263  }
264  if (DimItLast != DimItEnd && (--DimItLast) != DimItEnd) {
265  bMissedDimsEntry = (DimItLast != DimItCurr); // missed something
266  }
267  DimItLast = DimItCurr;
268  }
269  bDidCompare = true;
270  //catch special cases time, missing dimension values (after which we can abort)
271  if (bMissedDimsEntry || (itO = o.values.find(rIt->first)) == itEndO) {
272  if (time == o.time)
273  return 0;
274  return (time < o.time) ? -1 : 1;
275  }
276 
277  //if both Arguments are defined in the current dimensions
278  //compare them (otherwise we assume them equal and continue)
279  if (rIt->second != itO->second)
280  return (rIt->second < itO->second) ? -1 : 1;
281  }
282  if (dims == nullptr || (dims->find(Dimension::time) != DimItEnd || (!bDidCompare && !dims->empty()))) {
283  if (time == o.time)
284  return 0;
285  return (time < o.time) ? -1 : 1;
286  }
287  return 0;
288 }
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
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
simtime_t time
Stores the time dimension in Omnet&#39;s time type.
Definition: MappingBase.h:435
_Base::const_iterator const_iterator
Definition: MappingBase.h:153
iterator inet::physicallayer::Argument::end ( )
inline

Returns an iterator to the value behind the last argument value.

Referenced by inet::physicallayer::MappingUtils::findMax(), inet::physicallayer::MappingUtils::findMin(), isClose(), isSamePosition(), inet::physicallayer::ConstMapping::print(), and setArgValues().

652 { return values.end(); }
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
const_iterator inet::physicallayer::Argument::end ( ) const
inline

Returns an iterator to the value behind the last argument value.

656 { return values.end(); }
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
Argument::iterator inet::physicallayer::Argument::find ( const Argument::key_type dim)

Returns an iterator to the Argument value for the passed Dimension.

Returns end() if there is no Argument for that dimension.

Referenced by getArgValue(), and inet::physicallayer::ConstMapping::print().

70 {
71  assert(!(dim == Dimension::time));
72 
73  return values.find(dim);
74 }
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
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
Argument::const_iterator inet::physicallayer::Argument::find ( const Argument::key_type dim) const

Returns an iterator to the Argument value for the passed Dimension.

Returns end() if there is no Argument for that dimension.

77 {
78  assert(!(dim == Dimension::time));
79 
80  return values.find(dim);
81 }
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
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
Argument::mapped_type_cref inet::physicallayer::Argument::getArgValue ( const Argument::key_type dim) const

Returns the value for the specified dimension.

Note: Don't use this function to get the time value! Use "getTime()" instead.

Returns zero if no value with the specified dimension is set for this argument.

Referenced by inet::physicallayer::FilledUpMapping::appendValue(), inet::physicallayer::DimensionalAnalogModelBase::computeReceptionPower(), inet::physicallayer::MappingUtils::createCompatibleMapping(), inet::physicallayer::FrequencyMapping< Interpolator >::createIterator(), inet::physicallayer::SimpleConstMapping::createKeyEntries(), inet::physicallayer::MappingUtils::findMax(), inet::physicallayer::MappingUtils::findMin(), inet::physicallayer::FrequencyMapping< Interpolator >::getValue(), inet::physicallayer::MultiDimMapping< Linear >::getValue(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::iterateTo(), inet::physicallayer::MultiDimMappingIterator< Linear >::iterateTo(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::jumpTo(), inet::physicallayer::MultiDimMappingIterator< Linear >::jumpTo(), inet::physicallayer::MultiDimMappingIterator< Linear >::MultiDimMappingIterator(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::next(), inet::physicallayer::ConstMapping::print(), inet::physicallayer::FrequencyMapping< Interpolator >::setValue(), and inet::physicallayer::MultiDimMapping< Linear >::setValue().

103 {
104  const_iterator it = find(dim);
105 
106  if (it == values.end())
107  return MappedZero;
108 
109  return it->second;
110 }
static const mapped_type MappedZero
Zero value of a Argument value.
Definition: MappingBase.h:427
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
container_type::const_iterator const_iterator
Const-iterator type for this set.
Definition: MappingBase.h:444
iterator find(const Argument::key_type &dim)
Returns an iterator to the Argument value for the passed Dimension.
Definition: MappingBase.cc:69
DimensionSet inet::physicallayer::Argument::getDimensions ( ) const
inline

Returns the dimensions this argument is defined over.

Note: this method has linear complexity over the number of dimensions, since the DimensionSet has to be created from the values and their dimensions inside this Argument.

Referenced by inet::physicallayer::MappingUtils::findMax(), inet::physicallayer::MappingUtils::findMin(), operator<(), and inet::physicallayer::SimpleConstMappingIterator::SimpleConstMappingIterator().

607  {
608  typedef key_iterator<const_iterator> key_const_iterator;
609 
610  DimensionSet res(Dimension::time);
611 
612  res.insert(key_const_iterator(values.begin()), key_const_iterator(values.end()));
613 
614  return res;
615  }
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
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
bool inet::physicallayer::Argument::hasArgVal ( const Argument::key_type dim) const

Returns true if this Argument has a value for the passed Dimension.

Referenced by inet::physicallayer::MultiDimMapping< Linear >::getValue(), inet::physicallayer::MultiDimMappingIterator< Linear >::iterateTo(), and inet::physicallayer::MultiDimMappingIterator< Linear >::jumpTo().

98 {
99  return values.find(dim) != values.end();
100 }
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
Argument::iterator inet::physicallayer::Argument::insertValue ( iterator  pos,
const Argument::value_type valPair,
iterator itEnd,
bool  ignoreUnknown = false 
)
inlineprotected

Inserts the passed value for the passed Dimension into this Argument.

The parameter "pos" defines the position inside the Dimension<->Value-pair array to start searching for the dimension to set.

If the "ignoreUnknown"-parameter is set to true the new value is only set if the Dimension was defined in this Argument before (means, no new DImensions are added to the Argument).

The method returns the position inside the array the value was inserted.

Referenced by setArgValues().

127 {
128  pos = values.lower_bound(valPair.first);
129  if (pos != itEnd && !(values.key_comp()(valPair.first, pos->first))) {
130  // key already exists
131  // update pos->second if you care to
132  pos->second = valPair.second;
133  return pos;
134  }
135  if (ignoreUnknown)
136  return pos;
137 
138  pos = values.insert(pos, valPair);
139  itEnd = values.end();
140  return pos;
141 }
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
bool inet::physicallayer::Argument::isClose ( const Argument o,
Argument::mapped_type_cref  epsilon = Argument::mapped_type(0.000001) 
) const

Two Arguments are compared close if they have the same dimensions and their values don't differ more then a specific epsilon.

197 {
198  if (values.size() != o.values.size())
199  return false;
200 
201  if (fabs(SIMTIME_DBL(time - o.time)) > epsilon)
202  return false;
203 
204  const_iterator itO = o.begin();
205  const const_iterator itEnd = end();
206  const const_iterator itEndO = o.end();
207 
208  for (const_iterator it = begin();
209  it != itEnd && itO != itEndO; ++it)
210  {
211  if (!(it->first == itO->first) || (fabs(it->second - itO->second) > epsilon)) {
212  return false;
213  }
214  ++itO;
215  }
216 
217  return true;
218 }
iterator end()
Returns an iterator to the value behind the last argument value.
Definition: MappingBase.h:652
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
simtime_t time
Stores the time dimension in Omnet&#39;s time type.
Definition: MappingBase.h:435
iterator begin()
Returns an iterator to the first argument value in this Argument.
Definition: MappingBase.h:643
container_type::const_iterator const_iterator
Const-iterator type for this set.
Definition: MappingBase.h:444
bool inet::physicallayer::Argument::isSamePosition ( const Argument other) const

Returns true if the passed Argument points to the same position.

The functions returns true if every Dimension in the passed Argument exists in this Argument and their values are the same. The difference to the == operator is that the dimensions of the passed Argument can be a subset of the dimensions of this Argument.

159 {
160  if (time != o.time) {
161  return false;
162  }
163 
164  if (values.size() < o.values.size()) {
165  return false;
166  }
167 
168  if (o.values.empty())
169  return true;
170 
171  const_iterator itO = o.begin();
172  const_iterator it = begin();
173  const const_iterator itEnd = end();
174  const const_iterator itEndO = o.end();
175 
176  while (it != itEnd) {
177  if (itO->first < it->first) {
178  break;
179  }
180  else if (it->first < itO->first)
181  ++it;
182  else {
183  if (it->second != itO->second) {
184  break;
185  }
186  ++it;
187  ++itO;
188  }
189  if (itO == itEndO)
190  return true;
191  }
192 
193  return false;
194 }
iterator end()
Returns an iterator to the value behind the last argument value.
Definition: MappingBase.h:652
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
simtime_t time
Stores the time dimension in Omnet&#39;s time type.
Definition: MappingBase.h:435
iterator begin()
Returns an iterator to the first argument value in this Argument.
Definition: MappingBase.h:643
container_type::const_iterator const_iterator
Const-iterator type for this set.
Definition: MappingBase.h:444
Argument::iterator inet::physicallayer::Argument::lower_bound ( const Argument::key_type dim)

Returns an iterator to the first Argument value which dimension compares greater or equal to the passed Dimension.

84 {
85  assert(!(dim == Dimension::time));
86 
87  return values.lower_bound(dim);
88 }
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
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
Argument::const_iterator inet::physicallayer::Argument::lower_bound ( const Argument::key_type dim) const

Returns an iterator to the first Argument value which dimension compares greater or equal to the passed Dimension.

91 {
92  assert(!(dim == Dimension::time));
93 
94  return values.lower_bound(dim);
95 }
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
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
bool inet::physicallayer::Argument::operator< ( const Argument o) const

Returns true if this Argument is smaller then the passed Argument.

The dimensions of the Arguments have to be the same.

An Argument is compared smaller than another Argument if the value of the Dimension with the highest id is compared smaller. If the value of the highest Dimension is compared bigger the Argument isn't compared smaller (method returns false). If the values of the Dimension with the highest Dimension are equal, the next smaller Dimension is compared.

236 {
237  assert(getDimensions() == o.getDimensions());
238 
239  return compare(o) < 0;
240 }
int compare(const Argument &o, const DimensionSet *const dims=nullptr) const
Compares this Argument with the passed Argument in the dimensions of the passed DimensionsSet.
Definition: MappingBase.cc:242
DimensionSet getDimensions() const
Returns the dimensions this argument is defined over.
Definition: MappingBase.h:606
Argument & inet::physicallayer::Argument::operator= ( const Argument o)

Fast implementation of the copy-operator then the default implementation.

229 {
230  values = o.values;
231  time = o.time;
232  return *this;
233 }
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
simtime_t time
Stores the time dimension in Omnet&#39;s time type.
Definition: MappingBase.h:435
bool inet::physicallayer::Argument::operator== ( const Argument o) const

Two Arguments are compared equal if they have the same dimensions and the same values.

221 {
222  if (time != o.time || values.size() != o.values.size())
223  return false;
224 
225  return compare(o) == 0;
226 }
int compare(const Argument &o, const DimensionSet *const dims=nullptr) const
Compares this Argument with the passed Argument in the dimensions of the passed DimensionsSet.
Definition: MappingBase.cc:242
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
simtime_t time
Stores the time dimension in Omnet&#39;s time type.
Definition: MappingBase.h:435
void inet::physicallayer::Argument::setArgValue ( const Argument::key_type dim,
Argument::mapped_type_cref  value 
)

Changes the value for the specified dimension.

Note: Don't use this function to change the time value! Use "setTime()" instead.

If the argument doesn't already contain a value for the specified dimension the new dimension is added.

Referenced by inet::physicallayer::DimensionalNoise::computeMaxPower(), inet::physicallayer::DimensionalSNIR::computeMin(), inet::physicallayer::DimensionalReception::computeMinPower(), inet::physicallayer::DimensionalSignalAnalogModel::computeMinPower(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::computeNoise(), inet::physicallayer::SimpleConstMapping::createKeyEntries(), inet::physicallayer::DimensionalTransmitterBase::createPowerMapping(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::FrequencyMappingIterator(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::iterateTo(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::jumpTo(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::jumpToBegin(), inet::physicallayer::MultiDimMappingIterator< Linear >::jumpToBegin(), inet::physicallayer::MultiDimMappingIterator< Linear >::MultiDimMappingIterator(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::next(), inet::physicallayer::MultiDimMappingIterator< Linear >::next(), inet::physicallayer::ConstMapping::print(), inet::physicallayer::FrequencyMappingIterator< Interpolator >::updateNextPos(), and inet::physicallayer::MultiDimMappingIterator< Linear >::updateNextPosition().

113 {
114  assert(!(dim == Dimension::time));
115 
116  iterator pos = values.lower_bound(dim);
117  if (pos != values.end() && !(values.key_comp()(dim, pos->first))) {
118  // key already exists
119  // update pos->second if you care to
120  pos->second = value;
121  return;
122  }
123  values.insert(pos, Argument::value_type(dim, value));
124 }
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
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
container_type::iterator iterator
Iterator type for this set.
Definition: MappingBase.h:442
container_type::value_type value_type
Definition: MappingBase.h:433
void inet::physicallayer::Argument::setArgValues ( const Argument o,
bool  ignoreUnknown = false 
)

Update the values of this Argument with the values of the passed Argument.

Only the dimensions from the passed Argument are updated or added.

If the ignoreUnknown parameter is set to true, only the Dimensions already inside the Argument are updated.

Referenced by inet::physicallayer::MultiDimMappingIterator< Linear >::iterateTo(), inet::physicallayer::MultiDimMappingIterator< Linear >::jumpTo(), inet::physicallayer::MultiDimMappingIterator< Linear >::jumpToBegin(), inet::physicallayer::MultiDimMappingIterator< Linear >::next(), and inet::physicallayer::MultiDimMappingIterator< Linear >::updateNextPosition().

144 {
145  time = o.time;
146 
147  iterator pos = begin();
148  const const_iterator oEndIter = o.end();
149  iterator EndIter = values.end();
150 
151  for (const_iterator it = o.begin(); it != oEndIter; ++it) {
152  pos = insertValue(pos, *it, EndIter, ignoreUnknown);
153  if (ignoreUnknown && pos == EndIter)
154  break; //current dimension was not found and next will be also not in our dimension set
155  }
156 }
container_type values
Maps the dimensions of this Argument to their values.
Definition: MappingBase.h:438
simtime_t time
Stores the time dimension in Omnet&#39;s time type.
Definition: MappingBase.h:435
iterator insertValue(iterator pos, const Argument::value_type &valPair, iterator &itEnd, bool ignoreUnknown=false)
Inserts the passed value for the passed Dimension into this Argument.
Definition: MappingBase.cc:126
iterator begin()
Returns an iterator to the first argument value in this Argument.
Definition: MappingBase.h:643
container_type::iterator iterator
Iterator type for this set.
Definition: MappingBase.h:442
container_type::const_iterator const_iterator
Const-iterator type for this set.
Definition: MappingBase.h:444
void inet::physicallayer::Argument::setTime ( simtime_t_cref  time)

Changes the time value of this argument.

Referenced by inet::physicallayer::MappingUtils::addDiscontinuity(), inet::physicallayer::DimensionalNoise::computeMaxPower(), inet::physicallayer::DimensionalSNIR::computeMin(), inet::physicallayer::DimensionalReception::computeMinPower(), inet::physicallayer::DimensionalSignalAnalogModel::computeMinPower(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::computeNoise(), inet::physicallayer::DimensionalAnalogModelBase::computeReceptionPower(), inet::physicallayer::SimpleConstMapping::createKeyEntries(), inet::physicallayer::DimensionalTransmitterBase::createPowerMapping(), inet::physicallayer::BaseDelayedIterator< Base, Iterator >::delayPosition(), inet::physicallayer::BaseDelayedMapping< Mapping >::delayPosition(), inet::physicallayer::Ieee802154UWBIRTransmitter::generateBurst(), inet::physicallayer::Ieee802154UWBIRTransmitter::generatePulse(), inet::physicallayer::Ieee802154UWBIRTransmitter::generateSFD(), inet::physicallayer::Ieee802154UWBIRTransmitter::generateSyncPreamble(), inet::physicallayer::Ieee802154UWBIRReceiver::integrateWindow(), inet::physicallayer::TimeMappingIterator< Interpolator >::iterateTo(), inet::physicallayer::TimeMappingIterator< Interpolator >::jumpTo(), inet::physicallayer::TimeMappingIterator< Interpolator >::jumpToBegin(), inet::physicallayer::TimeMappingIterator< Interpolator >::next(), inet::physicallayer::ConstMapping::print(), inet::physicallayer::TimeMappingIterator< Interpolator >::TimeMappingIterator(), inet::physicallayer::BaseDelayedIterator< Base, Iterator >::undelayPosition(), and inet::physicallayer::TimeMappingIterator< Interpolator >::updateNextPos().

65 {
66  this->time = time;
67 }
simtime_t time
Stores the time dimension in Omnet&#39;s time type.
Definition: MappingBase.h:435

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Argument d 
)
friend

Output operator for Arguments.

Produces output of form "(x1, x2, x3, <...>)".

623  {
624  using std::operator<<;
625 
626  out << "(" << d.time;
627 
628  for (const_iterator it = d.begin(); it != d.end(); ++it) {
629  out << ", " << it->second << "@" << it->first;
630  }
631  return out << ")";
632  }
container_type::const_iterator const_iterator
Const-iterator type for this set.
Definition: MappingBase.h:444

Member Data Documentation

const Argument::mapped_type inet::physicallayer::Argument::MappedOne = Argument::mapped_type(1)
static

One value of a Argument value.

Referenced by inet::physicallayer::LinearIntplMapping::getValue().

simtime_t inet::physicallayer::Argument::time
protected

Stores the time dimension in Omnet's time type.

Referenced by compare(), getTime(), isClose(), isSamePosition(), operator=(), operator==(), setArgValues(), and setTime().

container_type inet::physicallayer::Argument::values
protected

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