AttributeChecker implementation for EnumValue.
More...
#include "enum.h"
|
using | Value = std::pair<T, std::string> |
| Type for the pair value, name.
|
|
using | ValueSet = std::list<Value> |
| Type of container for storing Enum values and symbol names.
|
|
template<typename T>
class ns3::EnumChecker< T >
AttributeChecker implementation for EnumValue.
- See also
- AttributeChecker
Definition at line 108 of file enum.h.
◆ Value
Type for the pair value, name.
Definition at line 150 of file enum.h.
◆ ValueSet
Type of container for storing Enum values and symbol names.
Definition at line 152 of file enum.h.
◆ EnumChecker()
◆ Add()
Add a new value.
- Parameters
-
[in] | value | The value. |
[in] | name | The enum symbol name. |
Definition at line 267 of file enum.h.
◆ AddDefault()
Add a default value.
- Parameters
-
[in] | value | The value. |
[in] | name | Then enum symbol name. |
Definition at line 260 of file enum.h.
◆ Check()
- Parameters
-
[in] | value | A pointer to the value to check |
- Returns
- true if the input value is both of the right type and if its value is within the requested range. Returns false otherwise.
Implements ns3::AttributeChecker.
Definition at line 316 of file enum.h.
References ns3::EnumValue< T >::Get().
◆ Copy()
Copy the source to the destination.
- Parameters
-
- Returns
- true if copy was successful
Implements ns3::AttributeChecker.
Definition at line 367 of file enum.h.
◆ Create()
- Returns
- a new instance of an AttributeValue (wrapper in an Attribute instance) which matches the type of the underlying attribute.
This method is typically used to create a temporary variable prior to calling Attribute::DeserializeFromString.
Implements ns3::AttributeChecker.
Definition at line 360 of file enum.h.
References ns3::Create().
◆ GetName()
Get the enum symbol name by value.
- Parameters
-
- Returns
- The enum symbol name.
Definition at line 274 of file enum.h.
References NS_ASSERT_MSG.
◆ GetUnderlyingTypeInformation()
- Returns
- a human-readable representation of information about the underlying C++ type.
Implements ns3::AttributeChecker.
Definition at line 346 of file enum.h.
◆ GetValue()
Get the enum value by name.
- Parameters
-
[in] | name | Then enum symbol name. |
- Returns
- The enum value.
Definition at line 288 of file enum.h.
References NS_ASSERT_MSG.
◆ GetValueTypeName()
- Returns
- the c++ fully-qualified typename of the subclass of the ns3::AttributeValue base class which is associated to this checker.
A typical return value here is FooValue where Foo is the name of the type being wrapped.
Implements ns3::AttributeChecker.
Definition at line 332 of file enum.h.
References ns3::Demangle().
◆ HasUnderlyingTypeInformation()
- Returns
- true if this checker has information about the underlying C++ type, false otherwise.
If this method returns false, the return value of the GetUnderlyingTypeInformation method cannot be relied upon.
Implements ns3::AttributeChecker.
Definition at line 339 of file enum.h.
◆ m_valueSet
The stored Enum values and symbol names.
Definition at line 154 of file enum.h.
The documentation for this class was generated from the following file: