ModelCreator class. More...
#include "model-node-creator.h"
Public Member Functions | |
ModelCreator () | |
void | Build (GtkTreeStore *treestore) |
Allocate attribute tree. | |
Public Member Functions inherited from ns3::AttributeIterator | |
AttributeIterator () | |
virtual | ~AttributeIterator () |
void | Iterate () |
Start the process of iterating all objects from the root namespace object. | |
Private Member Functions | |
void | Add (ModelNode *node) |
Add item to attribute tree. | |
void | DoEndVisitArrayAttribute () override |
End the visit to the attribute of type ns3::ObjectVectorValue. | |
void | DoEndVisitArrayItem () override |
End the visit to the array item. | |
void | DoEndVisitObject () override |
This method is called to end the process of visiting the currently visited object. | |
void | DoEndVisitPointerAttribute () override |
End the visit to the attribute of type ns3::PointerValue. | |
void | DoStartVisitArrayAttribute (Ptr< Object > object, std::string name, const ObjectPtrContainerValue &vector) override |
Visit the attribute of type ns3::ObjectVectorValue, with the provided name, found on the object pointed to by the first argument. | |
void | DoStartVisitArrayItem (const ObjectPtrContainerValue &vector, uint32_t index, Ptr< Object > item) override |
Start to visit the object found in the input array at the provided index. | |
void | DoStartVisitObject (Ptr< Object > object) override |
This method is called to start the process of visiting the input object. | |
void | DoStartVisitPointerAttribute (Ptr< Object > object, std::string name, Ptr< Object > value) override |
Visit the attribute of type ns3::PointerValue, with the provided name, found on the object pointed to by the first argument. | |
void | DoVisitAttribute (Ptr< Object > object, std::string name) override |
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. | |
void | Remove () |
Remove current tree item. | |
Private Attributes | |
std::vector< GtkTreeIter * > | m_iters |
attribute tree item | |
GtkTreeStore * | m_treestore |
attribute tree | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::AttributeIterator | |
std::string | GetCurrentPath () const |
Get the current attribute path. | |
ModelCreator class.
Definition at line 65 of file model-node-creator.h.
ns3::ModelCreator::ModelCreator | ( | ) |
Definition at line 24 of file model-node-creator.cc.
|
private |
Add item to attribute tree.
node | The model node |
Definition at line 41 of file model-node-creator.cc.
References ns3::COL_NODE, m_iters, and m_treestore.
Referenced by DoStartVisitArrayAttribute(), DoStartVisitObject(), DoStartVisitPointerAttribute(), and DoVisitAttribute().
void ns3::ModelCreator::Build | ( | GtkTreeStore * | treestore | ) |
Allocate attribute tree.
treestore | GtkTreeStore * |
Definition at line 30 of file model-node-creator.cc.
References ns3::AttributeIterator::Iterate(), m_iters, m_treestore, and NS_ASSERT.
Referenced by ns3::GtkConfigStore::ConfigureAttributes().
|
overrideprivatevirtual |
End the visit to the attribute of type ns3::ObjectVectorValue.
Reimplemented from ns3::AttributeIterator.
Definition at line 113 of file model-node-creator.cc.
References Remove().
|
overrideprivatevirtual |
End the visit to the array item.
Reimplemented from ns3::AttributeIterator.
Definition at line 135 of file model-node-creator.cc.
References m_iters.
|
overrideprivatevirtual |
This method is called to end the process of visiting the currently visited object.
Reimplemented from ns3::AttributeIterator.
Definition at line 79 of file model-node-creator.cc.
References Remove().
|
overrideprivatevirtual |
End the visit to the attribute of type ns3::PointerValue.
Reimplemented from ns3::AttributeIterator.
Definition at line 95 of file model-node-creator.cc.
References Remove().
|
overrideprivatevirtual |
Visit the attribute of type ns3::ObjectVectorValue, with the provided name, found on the object pointed to by the first argument.
object | the object on which the attribute of type ObjectVectorValue resides | |
name | the attribute name provided | |
[in] | vector | the ObjectPtrContainerValue corresponding to the named attribute |
Reimplemented from ns3::AttributeIterator.
Definition at line 101 of file model-node-creator.cc.
References Add(), ns3::ModelNode::name, ns3::ModelNode::NODE_VECTOR, ns3::ModelNode::object, and ns3::ModelNode::type.
|
overrideprivatevirtual |
Start to visit the object found in the input array at the provided index.
vector | the array | |
index | the index into the array | |
[in] | item | the array item to visit |
Reimplemented from ns3::AttributeIterator.
Definition at line 119 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.
This method is called to start the process of visiting the input object.
object | the object visited |
Reimplemented from ns3::AttributeIterator.
Definition at line 70 of file model-node-creator.cc.
References Add(), ns3::ModelNode::NODE_OBJECT, ns3::ModelNode::object, and ns3::ModelNode::type.
|
overrideprivatevirtual |
Visit the attribute of type ns3::PointerValue, with the provided name, found on the object pointed to by the first argument.
object | the object on which the attribute of type PointerValue resides | |
name | the attribute name provided | |
[in] | value | Ptr to the ns3::Object pointed to by the attribute |
Reimplemented from ns3::AttributeIterator.
Definition at line 85 of file model-node-creator.cc.
References Add(), ns3::ModelNode::name, ns3::ModelNode::NODE_POINTER, ns3::ModelNode::object, and ns3::ModelNode::type.
|
overrideprivatevirtual |
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.
object | the object visited |
name | the attribute name |
Implements ns3::AttributeIterator.
Definition at line 59 of file model-node-creator.cc.
References Add(), ns3::ModelNode::name, ns3::ModelNode::NODE_ATTRIBUTE, ns3::ModelNode::object, Remove(), and ns3::ModelNode::type.
|
private |
Remove current tree item.
Definition at line 51 of file model-node-creator.cc.
References m_iters.
Referenced by DoEndVisitArrayAttribute(), DoEndVisitObject(), DoEndVisitPointerAttribute(), and DoVisitAttribute().
|
private |
attribute tree item
Definition at line 101 of file model-node-creator.h.
Referenced by Add(), Build(), DoEndVisitArrayItem(), DoStartVisitArrayItem(), and Remove().
|
private |
attribute tree
Definition at line 100 of file model-node-creator.h.
Referenced by Add(), Build(), and DoStartVisitArrayItem().