A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::ModelTypeidCreator Class Reference

#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
 
GtkTreeStore * m_treestore
 

Detailed Description

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

Constructor & Destructor Documentation

ns3::ModelTypeidCreator::ModelTypeidCreator ( )

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

Member Function Documentation

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, current, m_iters, and m_treestore.

Referenced by StartVisitTypeId(), and VisitAttribute().

+ Here is the caller graph for this function:

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:

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:

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:

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:

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

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

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

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

GtkTreeStore* ns3::ModelTypeidCreator::m_treestore
private

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

Referenced by Add(), and Build().


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