A Discrete-Event Network Simulator
API
ns3::ModelCreator Class Reference

ModelCreator class. More...

#include "model-node-creator.h"

+ Inheritance diagram for ns3::ModelCreator:
+ Collaboration diagram for ns3::ModelCreator:

Public Member Functions

 ModelCreator ()
 
void Build (GtkTreeStore *treestore)
 Allocate attribute tree. More...
 
- Public Member Functions inherited from ns3::AttributeIterator
 AttributeIterator ()
 
virtual ~AttributeIterator ()
 
void Iterate (void)
 Start the process of iterating all objects from the root namespace object. More...
 

Private Member Functions

void Add (ModelNode *node)
 Add item to attribute tree. More...
 
virtual void DoEndVisitArrayAttribute (void)
 End the visit to the attribute of type ns3::ObjectVectorValue. More...
 
virtual void DoEndVisitArrayItem (void)
 End the visit to the array item. More...
 
virtual void DoEndVisitObject (void)
 This method is called to end the process of visiting the currently visited object. More...
 
virtual void DoEndVisitPointerAttribute (void)
 End the visit to the attribute of type ns3::PointerValue. More...
 
virtual void DoStartVisitArrayAttribute (Ptr< Object > object, std::string name, const ObjectPtrContainerValue &vector)
 Visit the attribute of type ns3::ObjectVectorValue, with the provided name, found on the object pointed to by the first argument. More...
 
virtual void DoStartVisitArrayItem (const ObjectPtrContainerValue &vector, uint32_t index, Ptr< Object > item)
 Start to visit the object found in the input array at the provided index. More...
 
virtual void DoStartVisitObject (Ptr< Object > object)
 This method is called to start the process of visiting the input object. More...
 
virtual void DoStartVisitPointerAttribute (Ptr< Object > object, std::string name, Ptr< Object > value)
 Visit the attribute of type ns3::PointerValue, with the provided name, found on the object pointed to by the first argument. More...
 
virtual void DoVisitAttribute (Ptr< Object > object, std::string name)
 This method visits and performs a config-store action (such as saving to a text file) on the attribute values corresponding to the input object pointer and attribute name. More...
 
void Remove (void)
 Remove current tree item. More...
 

Private Attributes

std::vector< GtkTreeIter * > m_iters
 attribute tree item More...
 
GtkTreeStore * m_treestore
 attribute tree More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::AttributeIterator
std::string GetCurrentPath (void) const
 Get the current attribute path. More...
 

Detailed Description

ModelCreator class.

Definition at line 64 of file model-node-creator.h.

Constructor & Destructor Documentation

ns3::ModelCreator::ModelCreator ( )

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

Member Function Documentation

void ns3::ModelCreator::Add ( ModelNode node)
private

Add item to attribute tree.

Parameters
nodeThe model node

Definition at line 40 of file model-node-creator.cc.

References ns3::COL_NODE, m_iters, and m_treestore.

Referenced by DoStartVisitArrayAttribute(), DoStartVisitObject(), DoStartVisitPointerAttribute(), and DoVisitAttribute().

+ Here is the caller graph for this function:

void ns3::ModelCreator::Build ( GtkTreeStore *  treestore)

Allocate attribute tree.

Parameters
treestoreGtkTreeStore *

Definition at line 28 of file model-node-creator.cc.

References ns3::AttributeIterator::Iterate(), m_iters, m_treestore, and NS_ASSERT.

Referenced by ns3::GtkConfigStore::ConfigureAttributes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::ModelCreator::DoEndVisitArrayAttribute ( void  )
privatevirtual

End the visit to the attribute of type ns3::ObjectVectorValue.

Reimplemented from ns3::AttributeIterator.

Definition at line 104 of file model-node-creator.cc.

References Remove().

+ Here is the call graph for this function:

void ns3::ModelCreator::DoEndVisitArrayItem ( void  )
privatevirtual

End the visit to the array item.

Reimplemented from ns3::AttributeIterator.

Definition at line 124 of file model-node-creator.cc.

References m_iters.

void ns3::ModelCreator::DoEndVisitObject ( void  )
privatevirtual

This method is called to end the process of visiting the currently visited object.

Reimplemented from ns3::AttributeIterator.

Definition at line 76 of file model-node-creator.cc.

References Remove().

+ Here is the call graph for this function:

void ns3::ModelCreator::DoEndVisitPointerAttribute ( void  )
privatevirtual

End the visit to the attribute of type ns3::PointerValue.

Reimplemented from ns3::AttributeIterator.

Definition at line 90 of file model-node-creator.cc.

References Remove().

+ Here is the call graph for this function:

void ns3::ModelCreator::DoStartVisitArrayAttribute ( Ptr< Object object,
std::string  name,
const ObjectPtrContainerValue vector 
)
privatevirtual

Visit the attribute of type ns3::ObjectVectorValue, with the provided name, found on the object pointed to by the first argument.

Note
type name ObjectVectorValue is an alias for ObjectPtrContainerValue
Parameters
objectthe object on which the attribute of type ObjectVectorValue resides
namethe attribute name provided
[in]vectorthe ObjectPtrContainerValue corresponding to the named attribute

Reimplemented from ns3::AttributeIterator.

Definition at line 95 of file model-node-creator.cc.

References Add(), ns3::ModelNode::name, ns3::ModelNode::NODE_VECTOR, ns3::ModelNode::object, and ns3::ModelNode::type.

+ Here is the call graph for this function:

void ns3::ModelCreator::DoStartVisitArrayItem ( const ObjectPtrContainerValue vector,
uint32_t  index,
Ptr< Object item 
)
privatevirtual

Start to visit the object found in the input array at the provided index.

Parameters
vectorthe array
indexthe index into the array
[in]itemthe array item to visit

Reimplemented from ns3::AttributeIterator.

Definition at line 109 of file model-node-creator.cc.

References ns3::COL_NODE, ns3::ModelNode::index, m_iters, m_treestore, ns3::ModelNode::NODE_VECTOR_ITEM, ns3::ModelNode::object, and ns3::ModelNode::type.

void ns3::ModelCreator::DoStartVisitObject ( Ptr< Object object)
privatevirtual

This method is called to start the process of visiting the input object.

Parameters
objectthe object visited

Reimplemented from ns3::AttributeIterator.

Definition at line 68 of file model-node-creator.cc.

References Add(), ns3::ModelNode::NODE_OBJECT, ns3::ModelNode::object, and ns3::ModelNode::type.

+ Here is the call graph for this function:

void ns3::ModelCreator::DoStartVisitPointerAttribute ( Ptr< Object object,
std::string  name,
Ptr< Object value 
)
privatevirtual

Visit the attribute of type ns3::PointerValue, with the provided name, found on the object pointed to by the first argument.

Parameters
objectthe object on which the attribute of type PointerValue resides
namethe attribute name provided
[in]valuePtr to the ns3::Object pointed to by the attribute

Reimplemented from ns3::AttributeIterator.

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

References Add(), ns3::ModelNode::name, ns3::ModelNode::NODE_POINTER, ns3::ModelNode::object, and ns3::ModelNode::type.

+ Here is the call graph for this function:

void ns3::ModelCreator::DoVisitAttribute ( Ptr< Object object,
std::string  name 
)
privatevirtual

This method visits and performs a config-store action (such as saving to a text file) on the attribute values corresponding to the input object pointer and attribute name.

Parameters
objectthe object visited
namethe attribute name

Implements ns3::AttributeIterator.

Definition at line 58 of file model-node-creator.cc.

References Add(), ns3::ModelNode::name, ns3::ModelNode::NODE_ATTRIBUTE, ns3::ModelNode::object, Remove(), and ns3::ModelNode::type.

+ Here is the call graph for this function:

void ns3::ModelCreator::Remove ( void  )
private

Remove current tree item.

Definition at line 50 of file model-node-creator.cc.

References m_iters.

Referenced by DoEndVisitArrayAttribute(), DoEndVisitObject(), DoEndVisitPointerAttribute(), and DoVisitAttribute().

+ Here is the caller graph for this function:

Member Data Documentation

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

attribute tree item

Definition at line 95 of file model-node-creator.h.

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

GtkTreeStore* ns3::ModelCreator::m_treestore
private

attribute tree

Definition at line 94 of file model-node-creator.h.

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


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