AttributeValue implementation for Callback. More...
#include "callback.h"
Public Member Functions | |
CallbackValue () | |
Constructor. | |
CallbackValue (const CallbackBase &base) | |
Copy constructor. | |
~CallbackValue () override | |
Destructor. | |
Ptr< AttributeValue > | Copy () const override |
bool | DeserializeFromString (std::string value, Ptr< const AttributeChecker > checker) override |
Deserialize from string (not implemented) | |
template<typename T > | |
bool | GetAccessor (T &value) const |
Access the Callback value as type T . | |
std::string | SerializeToString (Ptr< const AttributeChecker > checker) const override |
Serialize to string. | |
void | Set (CallbackBase base) |
Public Member Functions inherited from ns3::AttributeValue | |
AttributeValue () | |
virtual | ~AttributeValue () |
virtual Ptr< AttributeValue > | Copy () const =0 |
virtual bool | DeserializeFromString (std::string value, Ptr< const AttributeChecker > checker)=0 |
virtual std::string | SerializeToString (Ptr< const AttributeChecker > checker) const =0 |
Public Member Functions inherited from ns3::SimpleRefCount< AttributeValue > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Private Attributes | |
CallbackBase | m_value |
The stored Callback instance. | |
AttributeValue implementation for Callback.
Definition at line 803 of file callback.h.
ns3::CallbackValue::CallbackValue | ( | ) |
ns3::CallbackValue::CallbackValue | ( | const CallbackBase & | base | ) |
|
override |
|
overridevirtual |
Implements ns3::AttributeValue.
Definition at line 60 of file callback.cc.
References m_value, and NS_LOG_FUNCTION.
|
overridevirtual |
Deserialize from string (not implemented)
[in] | value | Source string |
[in] | checker | Checker to validate with |
true
if successful Implements ns3::AttributeValue.
Definition at line 76 of file callback.cc.
References NS_LOG_FUNCTION.
bool ns3::CallbackValue::GetAccessor | ( | T & | value | ) | const |
Access the Callback value as type T
.
T | [explicit] The type to cast to. |
[out] | value | The Callback value, as type T . |
Definition at line 852 of file callback.h.
References m_value, and NS_FATAL_ERROR_NO_MSG.
|
overridevirtual |
Serialize to string.
[in] | checker | The checker to validate with |
Implements ns3::AttributeValue.
Definition at line 67 of file callback.cc.
References ns3::CallbackBase::GetImpl(), m_value, NS_LOG_FUNCTION, and ns3::PeekPointer().
void ns3::CallbackValue::Set | ( | CallbackBase | base | ) |
[in] | base | The CallbackBase to use |
Definition at line 52 of file callback.cc.
References m_value, and NS_LOG_FUNCTION.
|
private |
The stored Callback instance.
Definition at line 839 of file callback.h.
Referenced by Copy(), GetAccessor(), SerializeToString(), and Set().