Hold objects of type std::pair<A, B>.
More...
#include "pair.h"
template<class A, class B>
class ns3::PairValue< A, B >
Hold objects of type std::pair<A, B>.
AttributeValue implementation for Pair.
- See also
- AttributeValue
Definition at line 55 of file pair.h.
◆ first_type
template<class A , class B >
Type of abscissa (first entry of pair).
Definition at line 61 of file pair.h.
◆ result_type
template<class A , class B >
Type returned by Get or passed in Set.
Definition at line 65 of file pair.h.
◆ second_type
template<class A , class B >
Type of ordinal (second entry of pair).
Definition at line 63 of file pair.h.
◆ value_type
template<class A , class B >
◆ PairValue() [1/2]
template<class A , class B >
◆ PairValue() [2/2]
template<class A , class B >
Construct this PairValue from a std::pair.
- Parameters
-
[in] | value | Value with which to construct. |
◆ Copy()
template<class A , class B >
◆ DeserializeFromString()
template<class A , class B >
- Parameters
-
[in] | value | A string representation of the value |
[in] | checker | A pointer to the checker associated to the attribute. |
- Returns
- true if the input string was correctly-formatted and could be successfully deserialized, false otherwise.
Upon return of this function, this AttributeValue instance contains the deserialized value. In most cases, this method will not make any use of the checker argument. However, in a very limited set of cases, the checker argument is needed to perform proper serialization. A nice example of code which needs it is the EnumValue::SerializeToString code.
Implements ns3::AttributeValue.
Definition at line 292 of file pair.h.
◆ Get()
template<class A , class B >
Get the stored value as a std::pair.
This differs from the actual value stored in the object which is a pair of Ptr<AV> where AV is a class derived from AttributeValue.
- Returns
- stored value as std::pair<A, B>.
-
The Pair value.
Definition at line 330 of file pair.h.
Referenced by PairValueTestCase::DoRun().
◆ GetAccessor()
template<class A , class B >
template<typename T >
Access the Pair value as type T
.
- Template Parameters
-
T | [explicit] The type to cast to. |
- Parameters
-
[out] | value | The Pair value, as type T . |
- Returns
- true.
Definition at line 345 of file pair.h.
◆ SerializeToString()
template<class A , class B >
- Parameters
-
[in] | checker | The checker associated to the attribute |
- Returns
- A string representation of this value.
In most cases, this method will not make any use of the checker argument. However, in a very limited set of cases, the checker argument is needed to perform proper serialization. A nice example of code which needs it is the EnumValue::SerializeToString code.
Implements ns3::AttributeValue.
Definition at line 318 of file pair.h.
◆ Set()
template<class A , class B >
◆ m_value
template<class A , class B >
The stored Pair instance.
Definition at line 96 of file pair.h.
The documentation for this class was generated from the following files: