#include "enum.h"
Inheritance diagram for ns3::EnumChecker< T >:
Collaboration diagram for ns3::EnumChecker< T >:Public Member Functions | |
| EnumChecker () | |
| void | Add (T value, std::string name) |
| Add a new value. More... | |
| void | AddDefault (T value, std::string name) |
| Add a default value. More... | |
| bool | Check (const AttributeValue &value) const override |
| bool | Copy (const AttributeValue &src, AttributeValue &dst) const override |
| Copy the source to the destination. More... | |
| Ptr< AttributeValue > | Create () const override |
| std::string | GetName (T value) const |
| Get the enum symbol name by value. More... | |
| std::string | GetUnderlyingTypeInformation () const override |
| T | GetValue (const std::string name) const |
| Get the enum value by name. More... | |
| std::string | GetValueTypeName () const override |
| bool | HasUnderlyingTypeInformation () const override |
Public Member Functions inherited from ns3::AttributeChecker | |
| AttributeChecker () | |
| virtual | ~AttributeChecker () |
| Ptr< AttributeValue > | CreateValidValue (const AttributeValue &value) const |
| Create a valid value from the argument value, or reinterpret the argument as a string. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< AttributeChecker > | |
| SimpleRefCount () | |
| Default constructor. More... | |
| SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
| Copy constructor. More... | |
| uint32_t | GetReferenceCount () const |
| Get the reference count of the object. More... | |
| SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
| Assignment operator. More... | |
| void | Ref () const |
| Increment the reference count. More... | |
| void | Unref () const |
| Decrement the reference count. More... | |
Private Types | |
| using | Value = std::pair< T, std::string > |
| Type for the pair value, name. More... | |
| using | ValueSet = std::list< Value > |
| Type of container for storing Enum values and symbol names. More... | |
Private Attributes | |
| ValueSet | m_valueSet |
| The stored Enum values and symbol names. More... | |
|
private |
|
private |
| ns3::EnumChecker< T >::EnumChecker |
| void ns3::EnumChecker< T >::Add | ( | T | value, |
| std::string | name | ||
| ) |
| void ns3::EnumChecker< T >::AddDefault | ( | T | value, |
| std::string | name | ||
| ) |
|
overridevirtual |
| [in] | value | A pointer to the value to check |
Implements ns3::AttributeChecker.
Definition at line 331 of file enum.h.
References ns3::EnumValue< T >::Get(), and second::value.
Here is the call graph for this function:
|
overridevirtual |
Copy the source to the destination.
| [in] | source | Source AttributeValue |
| [out] | destination | Destination AttributeValue |
Implements ns3::AttributeChecker.
|
overridevirtual |
This method is typically used to create a temporary variable prior to calling Attribute::DeserializeFromString.
Implements ns3::AttributeChecker.
| std::string ns3::EnumChecker< T >::GetName | ( | T | value | ) | const |
Get the enum symbol name by value.
| [in] | value | The value. |
Definition at line 289 of file enum.h.
References NS_ASSERT_MSG.
|
overridevirtual |
Implements ns3::AttributeChecker.
| T ns3::EnumChecker< T >::GetValue | ( | const std::string | name | ) | const |
Get the enum value by name.
| [in] | name | Then enum symbol name. |
Definition at line 303 of file enum.h.
References NS_ASSERT_MSG.
|
overridevirtual |
A typical return value here is FooValue where Foo is the name of the type being wrapped.
Implements ns3::AttributeChecker.
|
overridevirtual |
If this method returns false, the return value of the GetUnderlyingTypeInformation method cannot be relied upon.
Implements ns3::AttributeChecker.
|
private |