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 123 of file enum.h.
◆ Value
Type for the pair value, name.
Definition at line 165 of file enum.h.
◆ ValueSet
Type of container for storing Enum values and symbol names.
Definition at line 167 of file enum.h.
◆ EnumChecker()
◆ Add()
Add a new value.
- Parameters
-
[in] | value | The value. |
[in] | name | The enum symbol name. |
Definition at line 282 of file enum.h.
◆ AddDefault()
Add a default value.
- Parameters
-
[in] | value | The value. |
[in] | name | Then enum symbol name. |
Definition at line 275 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 331 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 382 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 375 of file enum.h.
◆ GetName()
Get the enum symbol name by value.
- Parameters
-
- Returns
- The enum symbol name.
Definition at line 289 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 361 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 303 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 347 of file enum.h.
◆ 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 354 of file enum.h.
◆ m_valueSet
The stored Enum values and symbol names.
Definition at line 169 of file enum.h.
The documentation for this class was generated from the following file: