Iterate over the Objects aggregated to an ns3::Object. More...
#include "object.h"
Public Member Functions | |
AggregateIterator () | |
Default constructor, which has no Object. | |
bool | HasNext () const |
Check if there are more Aggregates to iterate over. | |
Ptr< const Object > | Next () |
Get the next Aggregated Object. | |
Private Member Functions | |
AggregateIterator (Ptr< const Object > object) | |
Construct from an Object. | |
Private Attributes | |
uint32_t | m_current |
Current position in parent's aggregates. | |
Ptr< const Object > | m_object |
Parent Object. | |
std::vector< Ptr< Object > >::const_iterator | m_uniAggrIter |
Iterator to the unidirectional aggregates. | |
Friends | |
class | Object |
Object needs access. | |
Iterate over the Objects aggregated to an ns3::Object.
This iterator does not allow you to iterate over the parent Object used to call Object::GetAggregateIterator.
ns3::Object::AggregateIterator::AggregateIterator | ( | ) |
Construct from an Object.
This is private, with Object as friend, so only Objects can create useful AggregateIterators.
[in] | object | The Object whose Aggregates should be iterated over. |
Definition at line 74 of file object.cc.
References m_current, m_object, m_uniAggrIter, and NS_LOG_FUNCTION.
bool ns3::Object::AggregateIterator::HasNext | ( | ) | const |
Check if there are more Aggregates to iterate over.
true
if Next() can be called and return a non-null pointer, false
otherwise. Definition at line 48 of file object.cc.
References ns3::Object::m_aggregates, m_object, m_uniAggrIter, and NS_LOG_FUNCTION.
Referenced by ns3::AttributeIterator::DoIterate().
Get the next Aggregated Object.
Definition at line 56 of file object.cc.
References ns3::Object::m_aggregates, m_current, m_object, m_uniAggrIter, NS_LOG_FUNCTION, and Object.
Referenced by ns3::AttributeIterator::DoIterate().
|
friend |
|
private |
Current position in parent's aggregates.
Definition at line 128 of file object.h.
Referenced by AggregateIterator(), AggregateIterator(), and Next().
Parent Object.
Definition at line 127 of file object.h.
Referenced by AggregateIterator(), AggregateIterator(), HasNext(), and Next().
Iterator to the unidirectional aggregates.
Definition at line 130 of file object.h.
Referenced by AggregateIterator(), HasNext(), and Next().