#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. More... | |
![]() | |
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 |
Definition at line 47 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.
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().
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().
|
privatevirtual |
Remove the last gtk tree iterator.
Reimplemented from ns3::AttributeDefaultIterator.
Definition at line 77 of file model-typeid-creator.cc.
References Remove().
|
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().
|
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.
|
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.
|
private |
Definition at line 80 of file model-typeid-creator.h.
|
private |
Definition at line 78 of file model-typeid-creator.h.