INET Framework for OMNeT++/OMNEST
inet::physicallayer::Interpolated< V > Class Template Reference

Represents an interpolated value of any type. More...

#include <Interpolation.h>

Public Member Functions

 Interpolated (value_cref_type v, bool isIntpl=true)
 
 Interpolated (const Interpolated< value_type > &o)
 Copy-constructor which assures that the internal storage is used correctly. More...
 
value_ref_type operator* ()
 
value_ptr_type operator-> ()
 
bool operator== (const Interpolated< value_type > &other) const
 Two Interpolated<V> are compared equal if the value is the same as well as the "isInterpolated" flag. More...
 
bool operator!= (const Interpolated< value_type > &other) const
 Two Interpolated<V> are compared non equal if the value differs or the "isInterpolated" flag. More...
 

Public Attributes

const bool isInterpolated
 Stores if the underlying value is interpolated or not. More...
 

Protected Types

typedef V value_type
 
typedef const value_typevalue_cref_type
 
typedef value_typevalue_ref_type
 
typedef value_typevalue_ptr_type
 

Protected Attributes

value_type value
 A value this class represents. More...
 

Private Member Functions

 Interpolated ()
 

Detailed Description

template<class V>
class inet::physicallayer::Interpolated< V >

Represents an interpolated value of any type.

This class is used for performance, transparency and memory reasons. Since the actual value can be of arbitrary type and therefore arbitrary complexity (for example a whole Mapping instance) or could even be a pointer to an existing or a new object. This class hides the actual value from the user and just provides it with the value and takes care of any memory deallocation if necessary.

The actual value can be gotten by dereferencing the instance of this class (like with iterators).

Returned by InterpolateableMaps "getValue()"

Author
Karl Wessel

Member Typedef Documentation

template<class V>
typedef const value_type& inet::physicallayer::Interpolated< V >::value_cref_type
protected
template<class V>
typedef value_type* inet::physicallayer::Interpolated< V >::value_ptr_type
protected
template<class V>
typedef value_type& inet::physicallayer::Interpolated< V >::value_ref_type
protected
template<class V>
typedef V inet::physicallayer::Interpolated< V >::value_type
protected

Constructor & Destructor Documentation

template<class V>
inet::physicallayer::Interpolated< V >::Interpolated ( value_cref_type  v,
bool  isIntpl = true 
)
inline
66  :
67  value(v), isInterpolated(isIntpl) {}
const bool isInterpolated
Stores if the underlying value is interpolated or not.
Definition: Interpolation.h:63
value_type value
A value this class represents.
Definition: Interpolation.h:59
template<class V>
inet::physicallayer::Interpolated< V >::Interpolated ( const Interpolated< value_type > &  o)
inline

Copy-constructor which assures that the internal storage is used correctly.

72  :
73  value(o.value), isInterpolated(o.isInterpolated) {}
const bool isInterpolated
Stores if the underlying value is interpolated or not.
Definition: Interpolation.h:63
value_type value
A value this class represents.
Definition: Interpolation.h:59
template<class V>
inet::physicallayer::Interpolated< V >::Interpolated ( )
inlineprivate
102  :
103  value(), isInterpolated(true) {}
const bool isInterpolated
Stores if the underlying value is interpolated or not.
Definition: Interpolation.h:63
value_type value
A value this class represents.
Definition: Interpolation.h:59

Member Function Documentation

template<class V>
bool inet::physicallayer::Interpolated< V >::operator!= ( const Interpolated< value_type > &  other) const
inline

Two Interpolated<V> are compared non equal if the value differs or the "isInterpolated" flag.

97  {
98  return value != other.value || isInterpolated != other.isInterpolated;
99  }
const bool isInterpolated
Stores if the underlying value is interpolated or not.
Definition: Interpolation.h:63
value()
Definition: Units.h:75
value_type value
A value this class represents.
Definition: Interpolation.h:59
template<class V>
value_ref_type inet::physicallayer::Interpolated< V >::operator* ( )
inline
76  {
77  return value;
78  }
value_type value
A value this class represents.
Definition: Interpolation.h:59
template<class V>
value_ptr_type inet::physicallayer::Interpolated< V >::operator-> ( )
inline
81  {
82  return &value;
83  }
value_type value
A value this class represents.
Definition: Interpolation.h:59
template<class V>
bool inet::physicallayer::Interpolated< V >::operator== ( const Interpolated< value_type > &  other) const
inline

Two Interpolated<V> are compared equal if the value is the same as well as the "isInterpolated" flag.

89  {
90  return value == other.value && isInterpolated == other.isInterpolated;
91  }
const bool isInterpolated
Stores if the underlying value is interpolated or not.
Definition: Interpolation.h:63
value()
Definition: Units.h:75
value_type value
A value this class represents.
Definition: Interpolation.h:59

Member Data Documentation


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