#include <enum.h>
Public Member Functions | |
EnumChecker () | |
void | AddDefault (int v, std::string name) |
void | Add (int v, std::string name) |
virtual bool | Check (const AttributeValue &value) const |
virtual std::string | GetValueTypeName (void) const |
virtual bool | HasUnderlyingTypeInformation (void) const |
virtual std::string | GetUnderlyingTypeInformation (void) const |
virtual Ptr< AttributeValue > | Create (void) const |
virtual bool | Copy (const AttributeValue &src, AttributeValue &dst) const |
Private Types | |
typedef std::list< std::pair < int, std::string > > | ValueSet |
Private Attributes | |
ValueSet | m_valueSet |
Friends | |
class | EnumValue |
Definition at line 62 of file enum.h.
typedef std::list<std::pair<int,std::string> > ns3::EnumChecker::ValueSet [private] |
void ns3::EnumChecker::Add | ( | int | v, | |
std::string | name | |||
) |
Definition at line 89 of file enum.cc.
References m_valueSet.
void ns3::EnumChecker::AddDefault | ( | int | v, | |
std::string | name | |||
) |
Definition at line 84 of file enum.cc.
References m_valueSet.
bool ns3::EnumChecker::Check | ( | const AttributeValue & | value | ) | const [virtual] |
value | a pointer to the value to check |
Implements ns3::AttributeChecker.
Definition at line 94 of file enum.cc.
References ns3::EnumValue::Get(), and m_valueSet.
bool ns3::EnumChecker::Copy | ( | const AttributeValue & | src, | |
AttributeValue & | dst | |||
) | const [virtual] |
Implements ns3::AttributeChecker.
Ptr< AttributeValue > ns3::EnumChecker::Create | ( | void | ) | const [virtual] |
This method is typically used to create a temporary variable prior to calling Attribute::DeserializeFromString.
Implements ns3::AttributeChecker.
std::string ns3::EnumChecker::GetUnderlyingTypeInformation | ( | void | ) | const [virtual] |
Implements ns3::AttributeChecker.
Definition at line 121 of file enum.cc.
References m_valueSet.
std::string ns3::EnumChecker::GetValueTypeName | ( | void | ) | const [virtual] |
A typical return value here is FooValue where Foo is the name of the type being wrapped.
Implements ns3::AttributeChecker.
bool ns3::EnumChecker::HasUnderlyingTypeInformation | ( | void | ) | const [virtual] |
If this method returns false, the return value of the GetUnderlyingTypeInformation method cannot be relied upon.
Implements ns3::AttributeChecker.
ValueSet ns3::EnumChecker::m_valueSet [private] |
Definition at line 80 of file enum.h.
Referenced by Add(), AddDefault(), Check(), ns3::EnumValue::DeserializeFromString(), GetUnderlyingTypeInformation(), and ns3::EnumValue::SerializeToString().