allow setting and getting the value of an attribute. More...
#include <attribute.h>
Public Member Functions | |
AttributeAccessor () | |
virtual | ~AttributeAccessor () |
virtual bool | Get (const ObjectBase *object, AttributeValue &attribute) const =0 |
virtual bool | HasGetter (void) const =0 |
virtual bool | HasSetter (void) const =0 |
virtual bool | Set (ObjectBase *object, const AttributeValue &value) 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) |
allow setting and getting the value of an attribute.
The goal of this class is to hide from the user how an attribute is actually set or get to or from a class instance. Implementations of this base class are usually provided through the MakeAccessorHelper template functions, hidden behind an ATTRIBUTE_HELPER_* macro.
Definition at line 97 of file attribute.h.
ns3::AttributeAccessor::AttributeAccessor | ( | ) |
Definition at line 38 of file attribute.cc.
|
virtual |
Definition at line 41 of file attribute.cc.
|
pure virtual |
object | the object instance to get the value from |
attribute | a pointer to where the value should be set. |
This method expects that the caller has checked that the input value is valid with AttributeChecker::Check.
Implemented in ns3::ObjectPtrContainerAccessor, ns3::AccessorHelper< T, U >, and ns3::NscStackStringAccessor.
Referenced by ns3::ObjectBase::GetAttribute(), and ns3::ObjectBase::GetAttributeFailSafe().
|
pure virtual |
Implemented in ns3::ObjectPtrContainerAccessor, and ns3::NscStackStringAccessor.
Referenced by ns3::AttributeIterator::DoIterate(), ns3::ObjectBase::GetAttribute(), ns3::ObjectBase::GetAttributeFailSafe(), and PrintAttributes().
|
pure virtual |
Implemented in ns3::ObjectPtrContainerAccessor, and ns3::NscStackStringAccessor.
Referenced by ns3::AttributeIterator::DoIterate(), ns3::AttributeDefaultIterator::Iterate(), PrintAttributes(), ns3::ObjectBase::SetAttribute(), and ns3::ObjectBase::SetAttributeFailSafe().
|
pure virtual |
object | the object instance to set the value in |
value | the value to set |
This method expects that the caller has checked that the input value is valid with AttributeChecker::Check.
Implemented in ns3::ObjectPtrContainerAccessor, ns3::AccessorHelper< T, U >, and ns3::NscStackStringAccessor.