Container for a set of ns3::Object pointers. More...
#include "object-ptr-container.h"
Public Types | |
typedef std::map< std::size_t, Ptr< Object > >::const_iterator | Iterator |
Iterator type for traversing this container. | |
Public Member Functions | |
ObjectPtrContainerValue () | |
Default constructor. | |
Iterator | Begin () const |
Get an iterator to the first Object. | |
Ptr< AttributeValue > | Copy () const override |
Get a copy of this container. | |
bool | DeserializeFromString (std::string value, Ptr< const AttributeChecker > checker) override |
Deserialize from a string. | |
Iterator | End () const |
Get an iterator to the past-the-end Object. | |
Ptr< Object > | Get (std::size_t i) const |
Get a specific Object. | |
std::size_t | GetN () const |
Get the number of Objects. | |
std::string | SerializeToString (Ptr< const AttributeChecker > checker) const override |
Serialize each of the Object pointers to a string. | |
Public Member Functions inherited from ns3::AttributeValue | |
AttributeValue () | |
virtual | ~AttributeValue () |
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 | |
std::map< std::size_t, Ptr< Object > > | m_objects |
The container implementation. | |
Friends | |
class | ObjectPtrContainerAccessor |
ObjectPtrContainerAccessor::Get() needs access. | |
Container for a set of ns3::Object pointers.
This class it used to get attribute access to an array of ns3::Object pointers.
Call graph was not generated because of its size.
Definition at line 45 of file object-ptr-container.h.
typedef std::map<std::size_t,Ptr<Object>>::const_iterator ns3::ObjectPtrContainerValue::Iterator |
Iterator type for traversing this container.
Definition at line 49 of file object-ptr-container.h.
ns3::ObjectPtrContainerValue::ObjectPtrContainerValue | ( | ) |
Default constructor.
Definition at line 23 of file object-ptr-container.cc.
References NS_LOG_FUNCTION.
ObjectPtrContainerValue::Iterator ns3::ObjectPtrContainerValue::Begin | ( | ) | const |
Get an iterator to the first Object.
Definition at line 29 of file object-ptr-container.cc.
References m_objects, and NS_LOG_FUNCTION.
Referenced by LteRadioLinkFailureTestCase::CheckConnected(), LteRrcConnectionEstablishmentTestCase::CheckConnected(), LteX2HandoverMeasuresTestCase::CheckConnected(), LteX2HandoverTestCase::CheckConnected(), ns3::AttributeIterator::DoIterate(), ObjectMapAttributeTestCase::DoRun(), and SerializeToString().
|
overridevirtual |
Get a copy of this container.
Implements ns3::AttributeValue.
Definition at line 63 of file object-ptr-container.cc.
References ns3::Create(), and NS_LOG_FUNCTION.
|
overridevirtual |
Deserialize from a string.
(Not implemented; raises a fatal error.)
[in] | value | The serialized string form. |
[in] | checker | The checker to use. |
true
. Implements ns3::AttributeValue.
Definition at line 87 of file object-ptr-container.cc.
References NS_FATAL_ERROR, and NS_LOG_FUNCTION.
ObjectPtrContainerValue::Iterator ns3::ObjectPtrContainerValue::End | ( | ) | const |
Get an iterator to the past-the-end Object.
Definition at line 36 of file object-ptr-container.cc.
References m_objects, and NS_LOG_FUNCTION.
Referenced by LteRadioLinkFailureTestCase::CheckConnected(), LteRrcConnectionEstablishmentTestCase::CheckConnected(), LteX2HandoverMeasuresTestCase::CheckConnected(), LteX2HandoverTestCase::CheckConnected(), ns3::AttributeIterator::DoIterate(), and SerializeToString().
Get a specific Object.
[in] | i | The index of the requested object. |
Definition at line 50 of file object-ptr-container.cc.
References m_objects, and NS_LOG_FUNCTION.
Referenced by ObjectMapAttributeTestCase::DoRun(), and ObjectVectorAttributeTestCase::DoRun().
std::size_t ns3::ObjectPtrContainerValue::GetN | ( | ) | const |
Get the number of Objects.
Definition at line 43 of file object-ptr-container.cc.
References m_objects, and NS_LOG_FUNCTION.
Referenced by LteRadioLinkFailureTestCase::CheckConnected(), LteRrcConnectionEstablishmentTestCase::CheckConnected(), LteX2HandoverMeasuresTestCase::CheckConnected(), LteX2HandoverTestCase::CheckConnected(), ObjectMapAttributeTestCase::DoRun(), and ObjectVectorAttributeTestCase::DoRun().
|
overridevirtual |
Serialize each of the Object pointers to a string.
Note this serializes the Ptr values, not the Objects themselves.
[in] | checker | The checker to use (currently not used.) |
Implements ns3::AttributeValue.
Definition at line 70 of file object-ptr-container.cc.
References Begin(), End(), and NS_LOG_FUNCTION.
|
friend |
ObjectPtrContainerAccessor::Get() needs access.
Definition at line 106 of file object-ptr-container.h.
The container implementation.
Definition at line 108 of file object-ptr-container.h.
Referenced by Begin(), End(), ns3::ObjectPtrContainerAccessor::Get(), Get(), and GetN().