Hold variables of type enum
.
More...
#include "enum.h"
template<typename T>
class ns3::EnumValue< T >
Hold variables of type enum
.
This class can be used to hold variables of any kind of enum.
This is often used with ObjectFactory and Config to bind the value of a particular enum to an Attribute or Config name. For example,
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Hold variables of type enum.
Smart pointer class similar to boost::intrusive_ptr.
@ NO_SPLIT_HORIZON
No Split Horizon.
void SetDefault(std::string name, const AttributeValue &value)
Definition at line 61 of file enum.h.
◆ EnumValue() [1/2]
◆ EnumValue() [2/2]
◆ Copy()
◆ DeserializeFromString()
- 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 255 of file enum.h.
References NS_ASSERT, and ns3::PeekPointer().
◆ Get()
◆ GetAccessor()
◆ SerializeToString()
- 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 245 of file enum.h.
References NS_ASSERT, and ns3::PeekPointer().
◆ Set()
◆ m_value
The stored value.
Definition at line 76 of file enum.h.
The documentation for this class was generated from the following file: