ns3::EnumChecker Class Reference

#include <enum.h>

Inheritance diagram for ns3::EnumChecker:
Inheritance graph
[legend]
Collaboration diagram for ns3::EnumChecker:
Collaboration graph
[legend]

List of all members.

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< AttributeValueCreate (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

Detailed Description

Definition at line 62 of file enum.h.


Member Typedef Documentation

typedef std::list<std::pair<int,std::string> > ns3::EnumChecker::ValueSet [private]

Definition at line 79 of file enum.h.


Constructor & Destructor Documentation

ns3::EnumChecker::EnumChecker (  ) 

Definition at line 80 of file enum.cc.


Member Function Documentation

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]
Parameters:
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 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.

Definition at line 142 of file enum.cc.

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 136 of file enum.cc.

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 121 of file enum.cc.

References m_valueSet.

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 111 of file enum.cc.

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 116 of file enum.cc.


Friends And Related Function Documentation

friend class EnumValue [friend]

Definition at line 78 of file enum.h.


Member Data Documentation


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:10:20 2009 for NS-3 by  doxygen 1.6.3