A Discrete-Event Network Simulator
API
ns3::ModelTypeidCreator Class Reference

ModelTypeIdCreator class. More...

#include "model-typeid-creator.h"

+ Inheritance diagram for ns3::ModelTypeidCreator:
+ Collaboration diagram for ns3::ModelTypeidCreator:

Public Member Functions

 ModelTypeidCreator ()
 
void Build (GtkTreeStore *treestore)
 This method will iterate on typeIds having default attributes and create a model for them, this model will be used by the view. More...
 
- Public Member Functions inherited from ns3::AttributeDefaultIterator
virtual ~AttributeDefaultIterator ()=0
 
void Iterate (void)
 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

void Add (ModelTypeid *node)
 Adds a treestore iterator to m_treestore model. More...
 
virtual void EndVisitTypeId (void)
 Remove the last gtk tree iterator. More...
 
void Remove (void)
 Removes the last GtkTreeIterator from m_iters. More...
 
virtual void StartVisitTypeId (std::string name)
 Add a node for the new TypeId object. More...
 
virtual void VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index)
 This method will add a ModelTypeid to the GtkTreeIterator. More...
 

Private Attributes

std::vector< GtkTreeIter * > m_iters
 This contains a vector of iterators used to build the TreeStore. More...
 
GtkTreeStore * m_treestore
 this is the TreeStore model corresponding to the view More...
 

Detailed Description

ModelTypeIdCreator class.

Definition at line 62 of file model-typeid-creator.h.

Constructor & Destructor Documentation

◆ ModelTypeidCreator()

ns3::ModelTypeidCreator::ModelTypeidCreator ( )

Definition at line 23 of file model-typeid-creator.cc.

Member Function Documentation

◆ Add()

void ns3::ModelTypeidCreator::Add ( ModelTypeid node)
private

Adds a treestore iterator to m_treestore model.

Definition at line 37 of file model-typeid-creator.cc.

References ns3::COL_TYPEID, m_iters, and m_treestore.

Referenced by StartVisitTypeId(), and VisitAttribute().

+ Here is the caller graph for this function:

◆ Build()

void ns3::ModelTypeidCreator::Build ( GtkTreeStore *  treestore)

This method will iterate on typeIds having default attributes and create a model for them, this model will be used by the view.

Definition at line 28 of file model-typeid-creator.cc.

References ns3::AttributeDefaultIterator::Iterate(), m_iters, m_treestore, and NS_ASSERT.

Referenced by ns3::GtkConfigStore::ConfigureDefaults().

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

◆ EndVisitTypeId()

void ns3::ModelTypeidCreator::EndVisitTypeId ( void  )
privatevirtual

Remove the last gtk tree iterator.

Reimplemented from ns3::AttributeDefaultIterator.

Definition at line 77 of file model-typeid-creator.cc.

References Remove().

+ Here is the call graph for this function:

◆ Remove()

void ns3::ModelTypeidCreator::Remove ( void  )
private

Removes the last GtkTreeIterator from m_iters.

Definition at line 47 of file model-typeid-creator.cc.

References m_iters.

Referenced by EndVisitTypeId(), and VisitAttribute().

+ Here is the caller graph for this function:

◆ StartVisitTypeId()

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

Add a node for the new TypeId object.

Reimplemented from ns3::AttributeDefaultIterator.

Definition at line 68 of file model-typeid-creator.cc.

References Add(), ns3::TypeId::LookupByName(), ns3::ModelTypeid::NODE_TYPEID, ns3::ModelTypeid::tid, and ns3::ModelTypeid::type.

+ Here is the call graph for this function:

◆ VisitAttribute()

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

This method will add a ModelTypeid to the GtkTreeIterator.

Reimplemented from ns3::AttributeDefaultIterator.

Definition at line 55 of file model-typeid-creator.cc.

References Add(), ns3::ModelTypeid::defaultValue, ns3::ModelTypeid::index, ns3::ModelTypeid::name, ns3::ModelTypeid::NODE_ATTRIBUTE, Remove(), ns3::ModelTypeid::tid, and ns3::ModelTypeid::type.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_iters

std::vector<GtkTreeIter *> ns3::ModelTypeidCreator::m_iters
private

This contains a vector of iterators used to build the TreeStore.

Definition at line 95 of file model-typeid-creator.h.

Referenced by Add(), Build(), and Remove().

◆ m_treestore

GtkTreeStore* ns3::ModelTypeidCreator::m_treestore
private

this is the TreeStore model corresponding to the view

Definition at line 93 of file model-typeid-creator.h.

Referenced by Add(), and Build().


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