Iterator to iterate on the values of attributes of an ns3::Object. More...
#include "attribute-iterator.h"
Public Member Functions | |
| AttributeIterator () | |
| virtual | ~AttributeIterator () | 
| void | Iterate () | 
| Start the process of iterating all objects from the root namespace object.   | |
Protected Member Functions | |
| std::string | GetCurrentPath () const | 
| Get the current attribute path.   | |
Private Member Functions | |
| virtual void | DoEndVisitArrayAttribute () | 
| End the visit to the attribute of type ns3::ObjectVectorValue.   | |
| virtual void | DoEndVisitArrayItem () | 
| End the visit to the array item.   | |
| virtual void | DoEndVisitObject () | 
| This method is called to end the process of visiting the currently visited object.   | |
| virtual void | DoEndVisitPointerAttribute () | 
| End the visit to the attribute of type ns3::PointerValue.   | |
| void | DoIterate (Ptr< Object > object) | 
| Perform the iteration.   | |
| 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.   | |
| 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.   | |
| virtual void | DoStartVisitObject (Ptr< Object > object) | 
| This method is called to start the process of visiting the input object.   | |
| 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.   | |
| virtual void | DoVisitAttribute (Ptr< Object > object, std::string name)=0 | 
| 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 | EndVisitArrayAttribute () | 
| End the visit to the attribute of type ns3::ObjectVectorValue.   | |
| void | EndVisitArrayItem () | 
| End the visit to the array item.   | |
| void | EndVisitObject () | 
| End the visit to the object.   | |
| void | EndVisitPointerAttribute () | 
| End the visit to the attribute of type ns3::PointerValue.   | |
| std::string | GetCurrentPath (std::string attr) const | 
| Get current attribute path.   | |
| bool | IsExamined (Ptr< const Object > object) | 
| Check if this object has already been examined.   | |
| void | StartVisitArrayAttribute (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.   | |
| void | StartVisitArrayItem (const ObjectPtrContainerValue &vector, uint32_t index, Ptr< Object > item) | 
| Start to visit the object found in the input array at the provided index.   | |
| void | StartVisitObject (Ptr< Object > object) | 
| Start to visit an object to visit its attributes.   | |
| void | StartVisitPointerAttribute (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.   | |
| void | VisitAttribute (Ptr< Object > object, std::string name) | 
| Visit attribute to perform a config store operation on it.   | |
Private Attributes | |
| std::vector< std::string > | m_currentPath | 
| current attribute path   | |
| std::vector< Ptr< Object > > | m_examined | 
| list of attributes examined   | |
Iterator to iterate on the values of attributes of an ns3::Object.
Definition at line 25 of file attribute-iterator.h.
| ns3::AttributeIterator::AttributeIterator | ( | ) | 
Definition at line 22 of file attribute-iterator.cc.
      
  | 
  virtual | 
Definition at line 26 of file attribute-iterator.cc.
      
  | 
  privatevirtual | 
End the visit to the attribute of type ns3::ObjectVectorValue.
Reimplemented in ns3::ModelCreator.
Definition at line 113 of file attribute-iterator.cc.
Referenced by EndVisitArrayAttribute().
      
  | 
  privatevirtual | 
End the visit to the array item.
Reimplemented in ns3::ModelCreator.
Definition at line 125 of file attribute-iterator.cc.
Referenced by EndVisitArrayItem().
      
  | 
  privatevirtual | 
This method is called to end the process of visiting the currently visited object.
Reimplemented in ns3::ModelCreator.
Definition at line 89 of file attribute-iterator.cc.
Referenced by EndVisitObject().
      
  | 
  privatevirtual | 
End the visit to the attribute of type ns3::PointerValue.
Reimplemented in ns3::ModelCreator.
Definition at line 101 of file attribute-iterator.cc.
Referenced by EndVisitPointerAttribute().
Perform the iteration.
| object | the object visited | 
Definition at line 206 of file attribute-iterator.cc.
References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_GET, ns3::TypeId::ATTR_SET, ns3::TypeId::AttributeInformation::checker, ns3::TypeId::DEPRECATED, DoIterate(), EndVisitArrayAttribute(), EndVisitArrayItem(), EndVisitObject(), EndVisitPointerAttribute(), ns3::TypeId::AttributeInformation::flags, ns3::PointerValue::Get(), ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetName(), ns3::TypeId::GetParent(), ns3::Object::AggregateIterator::HasNext(), ns3::TypeId::HasParent(), IsExamined(), m_examined, ns3::TypeId::AttributeInformation::name, ns3::Object::AggregateIterator::Next(), NS_LOG_DEBUG, ns3::TypeId::OBSOLETE, ns3::PeekPointer(), StartVisitArrayAttribute(), StartVisitArrayItem(), StartVisitObject(), StartVisitPointerAttribute(), ns3::TypeId::AttributeInformation::supportLevel, and VisitAttribute().
Referenced by DoIterate(), and Iterate().
      
  | 
  privatevirtual | 
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 in ns3::ModelCreator.
Definition at line 106 of file attribute-iterator.cc.
Referenced by StartVisitArrayAttribute().
      
  | 
  privatevirtual | 
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 in ns3::ModelCreator.
Definition at line 118 of file attribute-iterator.cc.
Referenced by StartVisitArrayItem().
This method is called to start the process of visiting the input object.
| object | the object visited | 
Reimplemented in ns3::ModelCreator.
Definition at line 84 of file attribute-iterator.cc.
Referenced by StartVisitObject().
      
  | 
  privatevirtual | 
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 in ns3::ModelCreator.
Definition at line 94 of file attribute-iterator.cc.
Referenced by StartVisitPointerAttribute().
      
  | 
  privatepure virtual | 
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 | 
Implemented in ns3::ModelCreator.
Referenced by VisitAttribute().
      
  | 
  private | 
End the visit to the attribute of type ns3::ObjectVectorValue.
Definition at line 179 of file attribute-iterator.cc.
References DoEndVisitArrayAttribute(), and m_currentPath.
Referenced by DoIterate().
      
  | 
  private | 
End the visit to the array item.
Definition at line 198 of file attribute-iterator.cc.
References DoEndVisitArrayItem(), and m_currentPath.
Referenced by DoIterate().
      
  | 
  private | 
End the visit to the object.
Definition at line 145 of file attribute-iterator.cc.
References DoEndVisitObject(), and m_currentPath.
Referenced by DoIterate(), and Iterate().
      
  | 
  private | 
End the visit to the attribute of type ns3::PointerValue.
Definition at line 162 of file attribute-iterator.cc.
References DoEndVisitPointerAttribute(), and m_currentPath.
Referenced by DoIterate().
      
  | 
  protected | 
Get the current attribute path.
Definition at line 73 of file attribute-iterator.cc.
References m_currentPath.
      
  | 
  private | 
Get current attribute path.
| attr | the current attribute string | 
Definition at line 58 of file attribute-iterator.cc.
References m_currentPath.
Check if this object has already been examined.
| object | the object to check | 
Definition at line 45 of file attribute-iterator.cc.
References m_examined.
Referenced by DoIterate().
| void ns3::AttributeIterator::Iterate | ( | ) | 
Start the process of iterating all objects from the root namespace object.
Definition at line 31 of file attribute-iterator.cc.
References DoIterate(), EndVisitObject(), ns3::Config::GetRootNamespaceObject(), ns3::Config::GetRootNamespaceObjectN(), m_currentPath, m_examined, NS_ASSERT, and StartVisitObject().
Referenced by ns3::ModelCreator::Build().
      
  | 
  private | 
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 | 
Definition at line 170 of file attribute-iterator.cc.
References DoStartVisitArrayAttribute(), and m_currentPath.
Referenced by DoIterate().
      
  | 
  private | 
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 | 
Definition at line 186 of file attribute-iterator.cc.
References DoStartVisitArrayItem(), and m_currentPath.
Referenced by DoIterate().
Start to visit an object to visit its attributes.
| object | the current object | 
Definition at line 138 of file attribute-iterator.cc.
References DoStartVisitObject(), and m_currentPath.
Referenced by DoIterate(), and Iterate().
      
  | 
  private | 
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 | 
Definition at line 152 of file attribute-iterator.cc.
References DoStartVisitPointerAttribute(), and m_currentPath.
Referenced by DoIterate().
Visit attribute to perform a config store operation on it.
| object | the current object | 
| name | the attribute name | 
Definition at line 130 of file attribute-iterator.cc.
References DoVisitAttribute(), and m_currentPath.
Referenced by DoIterate().
      
  | 
  private | 
current attribute path
Definition at line 187 of file attribute-iterator.h.
Referenced by EndVisitArrayAttribute(), EndVisitArrayItem(), EndVisitObject(), EndVisitPointerAttribute(), GetCurrentPath(), GetCurrentPath(), Iterate(), StartVisitArrayAttribute(), StartVisitArrayItem(), StartVisitObject(), StartVisitPointerAttribute(), and VisitAttribute().
list of attributes examined
Definition at line 186 of file attribute-iterator.h.
Referenced by DoIterate(), IsExamined(), and Iterate().