20 #include "ns3/config.h"
22 #include "ns3/pointer.h"
23 #include "ns3/object-ptr-container.h"
24 #include "ns3/string.h"
57 for (uint32_t i = 0; i <
m_examined.size (); ++i)
71 std::ostringstream oss;
86 std::ostringstream oss;
177 std::ostringstream oss;
211 object->GetAttribute (info.
name, ptr);
226 if (vectorChecker != 0)
230 object->GetAttribute (info.
name, vector);
233 for (it = vector.
Begin (); it != vector.
End (); ++it)
235 uint32_t j = (*it).first;
236 NS_LOG_DEBUG (
"ObjectPtrContainer attribute item " << j);
262 bool recursiveAggregate =
false;
268 recursiveAggregate =
true;
271 if (!recursiveAggregate)
273 iter =
object->GetAggregateIterator ();
uint32_t GetAttributeN(void) const
Get the number of attributes.
virtual void DoStartVisitPointerAttribute(Ptr< Object > object, std::string name, Ptr< Object > value)
virtual void DoEndVisitObject(void)
void EndVisitPointerAttribute(void)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
U * PeekPointer(const Ptr< U > &p)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
TypeId GetParent(void) const
Get the parent of this TypeId.
virtual void DoEndVisitPointerAttribute(void)
virtual void DoEndVisitArrayAttribute(void)
bool IsExamined(Ptr< const Object > object)
std::vector< std::string > m_currentPath
std::map< uint32_t, Ptr< Object > >::const_iterator Iterator
Iterator type for traversing this container.
void EndVisitArrayItem(void)
void StartVisitArrayAttribute(Ptr< Object > object, std::string name, const ObjectPtrContainerValue &vector)
Ptr< const Object > Next(void)
Get the next Aggregated Object.
void StartVisitObject(Ptr< Object > object)
std::vector< Ptr< Object > > m_examined
Ptr< Object > GetRootNamespaceObject(uint32_t i)
AttributeChecker implementation for ObjectPtrContainerValue.
bool HasParent(void) const
Check if this TypeId has a parent.
uint32_t GetRootNamespaceObjectN(void)
virtual void DoStartVisitObject(Ptr< Object > object)
void VisitAttribute(Ptr< Object > object, std::string name)
The attribute can be written.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Hold objects of type Ptr.
virtual TypeId GetInstanceTypeId(void) const
Implement the GetInstanceTypeId method defined in ObjectBase.
std::string GetName(void) const
Get the name.
Iterator Begin(void) const
Get an iterator to the first Object.
virtual void DoEndVisitArrayItem(void)
void DoIterate(Ptr< Object > object)
AttributeChecker implementation for PointerValue.
bool HasNext(void) const
Check if there are more Aggregates to iterate over.
The attribute can be read.
std::string GetCurrentPath(void) const
virtual void DoStartVisitArrayItem(const ObjectPtrContainerValue &vector, uint32_t index, Ptr< Object > item)
Iterator End(void) const
Get an iterator to the past-the-end Object.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void EndVisitArrayAttribute(void)
void StartVisitPointerAttribute(Ptr< Object > object, std::string name, Ptr< Object > value)
A base class which provides memory management and object aggregation.
virtual ~AttributeIterator()
Container for a set of ns3::Object pointers.
struct TypeId::AttributeInformation GetAttribute(uint32_t i) const
Get Attribute information by index.
virtual void DoStartVisitArrayAttribute(Ptr< Object > object, std::string name, const ObjectPtrContainerValue &vector)
a unique identifier for an interface.
virtual void DoVisitAttribute(Ptr< Object > object, std::string name)=0
void StartVisitArrayItem(const ObjectPtrContainerValue &vector, uint32_t index, Ptr< Object > item)
Iterate over the Objects aggregated to an ns3::Object.
void EndVisitObject(void)