Represent the type of an attribute. More...
#include <attribute.h>
Public Member Functions | |
AttributeChecker () | |
virtual | ~AttributeChecker () |
virtual bool | Check (const AttributeValue &value) const =0 |
virtual bool | Copy (const AttributeValue &source, AttributeValue &destination) const =0 |
virtual Ptr< AttributeValue > | Create (void) const =0 |
Ptr< AttributeValue > | CreateValidValue (const AttributeValue &value) const |
virtual std::string | GetUnderlyingTypeInformation (void) const =0 |
virtual std::string | GetValueTypeName (void) const =0 |
virtual bool | HasUnderlyingTypeInformation (void) const =0 |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Additional Inherited Members | |
![]() | |
static void | Cleanup (void) |
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.
Definition at line 149 of file attribute.h.
ns3::AttributeChecker::AttributeChecker | ( | ) |
Definition at line 45 of file attribute.cc.
|
virtual |
Definition at line 48 of file attribute.cc.
|
pure virtual |
value | a pointer to the value to check |
Implemented in ns3::internal::AnObjectPtrContainerChecker< T >, and ns3::EnumChecker.
Referenced by CreateValidValue().
|
pure virtual |
Implemented in ns3::internal::AnObjectPtrContainerChecker< T >, and ns3::EnumChecker.
Referenced by ns3::GlobalValue::GetValue().
|
pure virtual |
This method is typically used to create a temporary variable prior to calling Attribute::DeserializeFromString.
Implemented in ns3::internal::AnObjectPtrContainerChecker< T >, and ns3::EnumChecker.
Referenced by CreateValidValue(), ns3::ObjectBase::GetAttribute(), ns3::ObjectBase::GetAttributeFailSafe(), and ns3::operator>>().
Ptr< AttributeValue > ns3::AttributeChecker::CreateValidValue | ( | const AttributeValue & | value | ) | const |
Definition at line 53 of file attribute.cc.
References Check(), ns3::AttributeValue::Copy(), Create(), ns3::AttributeValue::DeserializeFromString(), and ns3::StringValue::Get().
Referenced by ns3::ObjectBase::DoSet(), ns3::GlobalValue::GlobalValue(), ns3::GlobalValue::InitializeFromEnv(), ns3::ObjectFactory::Set(), ns3::Config::SetDefaultFailSafe(), and ns3::GlobalValue::SetValue().
|
pure virtual |
Implemented in ns3::internal::AnObjectPtrContainerChecker< T >, and ns3::EnumChecker.
Referenced by ns3::cell_tooltip_callback(), ns3::cell_tooltip_callback_config_default(), and PrintAttributes().
|
pure virtual |
A typical return value here is FooValue where Foo is the name of the type being wrapped.
Implemented in ns3::internal::AnObjectPtrContainerChecker< T >, and ns3::EnumChecker.
Referenced by ns3::cell_tooltip_callback(), ns3::cell_tooltip_callback_config_default(), and PrintAttributes().
|
pure virtual |
If this method returns false, the return value of the GetUnderlyingTypeInformation method cannot be relied upon.
Implemented in ns3::internal::AnObjectPtrContainerChecker< T >, and ns3::EnumChecker.
Referenced by ns3::cell_tooltip_callback(), ns3::cell_tooltip_callback_config_default(), and PrintAttributes().