ns3::AttributeChecker Class Reference
[Attribute]

Represent the type of an attribute. More...

#include <attribute.h>

Inheritance diagram for ns3::AttributeChecker:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual bool Check (const AttributeValue &value) const =0
virtual std::string GetValueTypeName (void) const =0
virtual bool HasUnderlyingTypeInformation (void) const =0
virtual std::string GetUnderlyingTypeInformation (void) const =0
virtual Ptr< AttributeValueCreate (void) const =0


Detailed Description

Represent the type of an attribute.

Each type of attribute has an associated unique AttributeChecker subclass. The type of the subclass can be safely used by users to infer the type of the associated attribute. i.e., we expect binding authors to use the checker associated to an attribute to detect the type of the associated attribute.

Most subclasses of this base class are implemented by the ATTRIBUTE_HELPER_HEADER and ATTRIBUTE_HELPER_CPP macros.


Member Function Documentation

virtual bool ns3::AttributeChecker::Check ( const AttributeValue value  )  const [pure 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.

virtual Ptr<AttributeValue> ns3::AttributeChecker::Create ( void   )  const [pure 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.

virtual std::string ns3::AttributeChecker::GetUnderlyingTypeInformation ( void   )  const [pure virtual]

Returns:
a human-readable representation of information about the underlying C++ type.

virtual std::string ns3::AttributeChecker::GetValueTypeName ( void   )  const [pure 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.

virtual bool ns3::AttributeChecker::HasUnderlyingTypeInformation ( void   )  const [pure 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.


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

Generated on Fri Apr 9 15:01:08 2010 for NS-3 by  doxygen 1.5.8