A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
- 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.
 

Detailed Description

ModelCreator class.

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

Constructor & Destructor Documentation

◆ ModelCreator()

ns3::ModelCreator::ModelCreator ( )

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

Member Function Documentation

◆ Add()

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

Add item to attribute tree.

Parameters
nodeThe model node

Definition at line 30 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:

◆ Build()

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

Allocate attribute tree.

Parameters
treestoreGtkTreeStore *

Definition at line 19 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:

◆ DoEndVisitArrayAttribute()

void ns3::ModelCreator::DoEndVisitArrayAttribute ( )
overrideprivatevirtual

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

Reimplemented from ns3::AttributeIterator.

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

References Remove().

+ Here is the call graph for this function:

◆ DoEndVisitArrayItem()

void ns3::ModelCreator::DoEndVisitArrayItem ( )
overrideprivatevirtual

End the visit to the array item.

Reimplemented from ns3::AttributeIterator.

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

References m_iters.

◆ DoEndVisitObject()

void ns3::ModelCreator::DoEndVisitObject ( )
overrideprivatevirtual

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

Reimplemented from ns3::AttributeIterator.

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

References Remove().

+ Here is the call graph for this function:

◆ DoEndVisitPointerAttribute()

void ns3::ModelCreator::DoEndVisitPointerAttribute ( )
overrideprivatevirtual

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

Reimplemented from ns3::AttributeIterator.

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

References Remove().

+ Here is the call graph for this function:

◆ DoStartVisitArrayAttribute()

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

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 90 of file model-node-creator.cc.

References Add(), and ns3::ModelNode::NODE_VECTOR.

+ Here is the call graph for this function:

◆ DoStartVisitArrayItem()

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

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 108 of file model-node-creator.cc.

References ns3::COL_NODE, m_iters, m_treestore, and ns3::ModelNode::NODE_VECTOR_ITEM.

◆ DoStartVisitObject()

void ns3::ModelCreator::DoStartVisitObject ( Ptr< Object > object)
overrideprivatevirtual

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

Parameters
objectthe object visited

Reimplemented from ns3::AttributeIterator.

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

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

+ Here is the call graph for this function:

◆ DoStartVisitPointerAttribute()

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

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 74 of file model-node-creator.cc.

References Add(), and ns3::ModelNode::NODE_POINTER.

+ Here is the call graph for this function:

◆ DoVisitAttribute()

void ns3::ModelCreator::DoVisitAttribute ( Ptr< Object > object,
std::string name )
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.

Parameters
objectthe object visited
namethe attribute name

Implements ns3::AttributeIterator.

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

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

+ Here is the call graph for this function:

◆ Remove()

void ns3::ModelCreator::Remove ( )
private

Remove current tree item.

Definition at line 40 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

◆ m_iters

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

attribute tree item

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

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

◆ m_treestore

GtkTreeStore* ns3::ModelCreator::m_treestore
private

attribute tree

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

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


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