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 47 of file pair.h.
◆ first_type
template<class A , class B >
Type of abscissa (first entry of pair).
Definition at line 53 of file pair.h.
◆ result_type
template<class A , class B >
Type returned by Get or passed in Set.
Definition at line 57 of file pair.h.
◆ second_type
template<class A , class B >
Type of ordinal (second entry of pair).
Definition at line 55 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 278 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 316 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 331 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 304 of file pair.h.
◆ Set()
template<class A , class B >
Set the stored value.
Set the value.
- Parameters
-
[in] | value | std::pair<A, B> to be stored. |
[in] | value | The value to adopt. |
Definition at line 323 of file pair.h.
Referenced by PairValueTestCase::DoRun().
◆ m_value
template<class A , class B >
The stored Pair instance.
Definition at line 91 of file pair.h.
The documentation for this class was generated from the following files: