A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
- Public Member Functions inherited from ns3::AttributeDefaultIterator
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.
 

Private Member Functions

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

Private Attributes

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

Detailed Description

ModelTypeIdCreator class.

Definition at line 65 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.

Parameters
nodethe node to be added

Definition at line 38 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.

Parameters
treestorethe GtkTreeStore.

Definition at line 29 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 ( )
overrideprivatevirtual

Remove the last gtk tree iterator.

Reimplemented from ns3::AttributeDefaultIterator.

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

References Remove().

+ Here is the call graph for this function:

◆ Remove()

void ns3::ModelTypeidCreator::Remove ( )
private

Removes the last GtkTreeIterator from m_iters.

Definition at line 48 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)
overrideprivatevirtual

Add a node for the new TypeId object.

Parameters
nameTypeId name

Reimplemented from ns3::AttributeDefaultIterator.

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

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

+ Here is the call graph for this function:

◆ VisitAttribute()

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

This method will add a ModelTypeid to the GtkTreeIterator.

Parameters
tidTypeId
nameattribute name
defaultValuedefault value
indexindex of the attribute in the specified Typeid

Reimplemented from ns3::AttributeDefaultIterator.

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

References Add(), ns3::ModelTypeid::NODE_ATTRIBUTE, and Remove().

+ 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 110 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 108 of file model-typeid-creator.h.

Referenced by Add(), and Build().


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