Basic functionality for accessing class attributes via class data members, or get functor/set methods. More...
#include <attribute-accessor-helper.h>
Public Member Functions | |
AccessorHelper () | |
Constructor. More... | |
virtual bool | Get (const ObjectBase *object, AttributeValue &val) const |
Get the value of the underlying member into the AttributeValue. More... | |
virtual bool | Set (ObjectBase *object, const AttributeValue &val) const |
Set the underlying member to the argument AttributeValue. More... | |
![]() | |
AttributeAccessor () | |
virtual | ~AttributeAccessor () |
virtual bool | HasGetter (void) const =0 |
virtual bool | HasSetter (void) const =0 |
![]() | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Private Member Functions | |
virtual bool | DoGet (const T *object, U *v) const =0 |
Getter implementation. More... | |
virtual bool | DoSet (T *object, const U *v) const =0 |
Setter implementation. More... | |
Additional Inherited Members | |
![]() | |
static void | Cleanup (void) |
Noop. More... | |
Basic functionality for accessing class attributes via class data members, or get functor/set methods.
T | Class of object holding the attribute. |
U | AttributeValue type for the underlying class member which is an attribute. |
Definition at line 158 of file attribute-accessor-helper.h.
|
inline |
Constructor.
Definition at line 162 of file attribute-accessor-helper.h.
|
privatepure virtual |
Getter implementation.
object | The parent object holding the attribute. |
v | The specific AttributeValue to set. |
Referenced by ns3::AccessorHelper< T, U >::Get().
|
privatepure virtual |
Setter implementation.
object | The parent object holding the attribute. |
v | The specific AttributeValue to set. |
Referenced by ns3::AccessorHelper< T, U >::Set().
|
inlinevirtual |
Get the value of the underlying member into the AttributeValue.
Handle dynamic casting from generic ObjectBase and AttributeValue up to desired object class and specific AttributeValue.
Forwards to DoGet method.
object | Generic object pointer, to upcast to T . |
val | Generic AttributeValue, to upcast to U . |
Implements ns3::AttributeAccessor.
Definition at line 202 of file attribute-accessor-helper.h.
References ns3::AccessorHelper< T, U >::DoGet().
|
inlinevirtual |
Set the underlying member to the argument AttributeValue.
Handle dynamic casting from generic ObjectBase and AttributeValue up to desired object class and specific AttributeValue.
Forwards to DoSet method.
object | Generic object pointer, to upcast to T . |
val | Generic AttributeValue, to upcast to U . |
Implements ns3::AttributeAccessor.
Definition at line 176 of file attribute-accessor-helper.h.
References ns3::AccessorHelper< T, U >::DoSet().
Referenced by ns3::DoMakeAccessorHelperOne(), and ns3::DoMakeAccessorHelperTwo().