A Discrete-Event Network Simulator
API
ns3::AttributeDefaultIterator Class Referenceabstract

Iterator to iterate on the default values of attributes of an ns3::Object. More...

#include "attribute-default-iterator.h"

+ Inheritance diagram for ns3::AttributeDefaultIterator:

Public Member Functions

virtual ~AttributeDefaultIterator ()=0
 
void Iterate ()
 This function will go through all the TypeIds and get only the attributes which are explicit values (not vectors or pointer or arrays) and apply StartVisitTypeId and VisitAttribute on the attributes in one TypeId. More...
 

Private Member Functions

virtual void DoVisitAttribute (std::string name, std::string defaultValue)
 Visit an Attribute. More...
 
virtual void EndVisitTypeId ()
 End the analysis of a TypeId. More...
 
virtual void StartVisitTypeId (std::string name)
 Begin the analysis of a TypeId. More...
 
virtual void VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index)
 Visit an Attribute. More...
 

Detailed Description

Iterator to iterate on the default values of attributes of an ns3::Object.

Definition at line 34 of file attribute-default-iterator.h.

Constructor & Destructor Documentation

◆ ~AttributeDefaultIterator()

ns3::AttributeDefaultIterator::~AttributeDefaultIterator ( )
pure virtual

Definition at line 31 of file attribute-default-iterator.cc.

Member Function Documentation

◆ DoVisitAttribute()

void ns3::AttributeDefaultIterator::DoVisitAttribute ( std::string  name,
std::string  defaultValue 
)
privatevirtual

Visit an Attribute.

Parameters
namethe Attribute name
defaultValuethe attribute default value

Definition at line 120 of file attribute-default-iterator.cc.

Referenced by VisitAttribute().

+ Here is the caller graph for this function:

◆ EndVisitTypeId()

void ns3::AttributeDefaultIterator::EndVisitTypeId ( )
privatevirtual

End the analysis of a TypeId.

Reimplemented in ns3::ModelTypeidCreator.

Definition at line 115 of file attribute-default-iterator.cc.

Referenced by Iterate().

+ Here is the caller graph for this function:

◆ Iterate()

void ns3::AttributeDefaultIterator::Iterate ( )

This function will go through all the TypeIds and get only the attributes which are explicit values (not vectors or pointer or arrays) and apply StartVisitTypeId and VisitAttribute on the attributes in one TypeId.

At the end of each TypeId EndVisitTypeId is called.

Definition at line 36 of file attribute-default-iterator.cc.

References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_CONSTRUCT, ns3::TypeId::AttributeInformation::checker, EndVisitTypeId(), ns3::TypeId::AttributeInformation::flags, ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetName(), ns3::TypeId::GetRegistered(), ns3::TypeId::GetRegisteredN(), ns3::TypeId::AttributeInformation::initialValue, ns3::TypeId::MustHideFromDocumentation(), ns3::TypeId::AttributeInformation::name, StartVisitTypeId(), and VisitAttribute().

Referenced by ns3::ModelTypeidCreator::Build().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StartVisitTypeId()

void ns3::AttributeDefaultIterator::StartVisitTypeId ( std::string  name)
privatevirtual

Begin the analysis of a TypeId.

Parameters
nameTypeId name

Reimplemented in ns3::ModelTypeidCreator.

Definition at line 110 of file attribute-default-iterator.cc.

Referenced by Iterate().

+ Here is the caller graph for this function:

◆ VisitAttribute()

void ns3::AttributeDefaultIterator::VisitAttribute ( TypeId  tid,
std::string  name,
std::string  defaultValue,
uint32_t  index 
)
privatevirtual

Visit an Attribute.

Parameters
tidthe TypeId the attribute belongs to
namethe Attribute name
defaultValuethe attribute default value
indexthe index of the Attribute

Reimplemented in ns3::ModelTypeidCreator.

Definition at line 125 of file attribute-default-iterator.cc.

References DoVisitAttribute().

Referenced by Iterate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: