19 #include "model-typeid-creator.h"
23 ModelTypeidCreator::ModelTypeidCreator ()
30 m_treestore = treestore;
31 m_iters.push_back (0);
39 GtkTreeIter *parent = m_iters.back ();
40 GtkTreeIter *current = g_new (GtkTreeIter, 1);
41 gtk_tree_store_append (m_treestore, current, parent);
42 gtk_tree_store_set (m_treestore, current, COL_TYPEID, node, -1);
43 m_iters.push_back (current);
49 GtkTreeIter *iter = m_iters.back ();
58 node->type = ModelTypeid::NODE_ATTRIBUTE;
61 node->defaultValue = defaultValue;
71 node->type = ModelTypeid::NODE_TYPEID;
virtual void VisitAttribute(TypeId tid, std::string name, std::string defaultValue, uint32_t index)
This method will add a ModelTypeid to the GtkTreeIterator.
#define NS_ASSERT(condition)
void Build(GtkTreeStore *treestore)
This method will iterate on typeIds having default attributes and create a model for them...
virtual void EndVisitTypeId(void)
Remove the last gtk tree iterator.
virtual void StartVisitTypeId(std::string name)
Add a node for the new TypeId object.
void Add(ModelTypeid *node)
Adds a treestore iterator to m_treestore model.
void Iterate(void)
This function will go through all the TypeIds and get only the attributes which are explicit values (...
a unique identifier for an interface.
static TypeId LookupByName(std::string name)