ModelTypeIdCreator class. More...
#include "model-typeid-creator.h"
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 | |
ModelTypeIdCreator class.
Definition at line 65 of file model-typeid-creator.h.
ns3::ModelTypeidCreator::ModelTypeidCreator | ( | ) |
Definition at line 23 of file model-typeid-creator.cc.
|
private |
Adds a treestore iterator to m_treestore model.
node | the 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().
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.
treestore | the 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().
|
overrideprivatevirtual |
Remove the last gtk tree iterator.
Reimplemented from ns3::AttributeDefaultIterator.
Definition at line 81 of file model-typeid-creator.cc.
References 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().
|
overrideprivatevirtual |
Add a node for the new TypeId object.
name | TypeId 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.
|
overrideprivatevirtual |
This method will add a ModelTypeid to the GtkTreeIterator.
tid | TypeId |
name | attribute name |
defaultValue | default value |
index | index 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().
|
private |
This contains a vector of iterators used to build the TreeStore.
Definition at line 110 of file model-typeid-creator.h.
|
private |
this is the TreeStore model corresponding to the view
Definition at line 108 of file model-typeid-creator.h.