A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::EnumChecker Class Reference
+ Inheritance diagram for ns3::EnumChecker:

Public Member Functions

void Add (int v, std::string name)
 
void AddDefault (int v, std::string name)
 
virtual bool Check (const AttributeValue &value) const
 
virtual bool Copy (const AttributeValue &src, AttributeValue &dst) const
 
virtual Ptr< AttributeValueCreate (void) const
 
virtual std::string GetUnderlyingTypeInformation (void) const
 
virtual std::string GetValueTypeName (void) const
 
virtual bool HasUnderlyingTypeInformation (void) const
 
- Public Member Functions inherited from ns3::AttributeChecker
Ptr< AttributeValueCreateValidValue (const AttributeValue &value) const
 
- Public Member Functions inherited from ns3::SimpleRefCount< AttributeChecker >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 

Private Types

typedef std::list< std::pair
< int, std::string > > 
ValueSet
 

Private Attributes

ValueSet m_valueSet
 

Friends

class EnumValue
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< AttributeChecker >
static void Cleanup (void)
 

Detailed Description

Definition at line 62 of file enum.h.

Member Function Documentation

bool ns3::EnumChecker::Check ( const AttributeValue value) const
virtual
Parameters
valuea 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 110 of file enum.cc.

References NS_LOG_FUNCTION.

Ptr< AttributeValue > ns3::EnumChecker::Create ( void  ) const
virtual
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 156 of file enum.cc.

References NS_LOG_FUNCTION.

std::string ns3::EnumChecker::GetUnderlyingTypeInformation ( void  ) const
virtual
Returns
a human-readable representation of information about the underlying C++ type.

Implements ns3::AttributeChecker.

Definition at line 140 of file enum.cc.

References NS_LOG_FUNCTION.

std::string ns3::EnumChecker::GetValueTypeName ( void  ) const
virtual
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 128 of file enum.cc.

References NS_LOG_FUNCTION.

bool ns3::EnumChecker::HasUnderlyingTypeInformation ( void  ) const
virtual
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 134 of file enum.cc.

References NS_LOG_FUNCTION.


The documentation for this class was generated from the following files: