DDS  ver. 3.6
Public Types | Public Member Functions | Friends | List of all members
dds::topology_api::CTopoGroup Class Reference

#include <TopoGroup.h>

Inheritance diagram for dds::topology_api::CTopoGroup:
dds::topology_api::CTopoContainer dds::topology_api::CTopoElement dds::topology_api::CTopoBase

Public Types

using Ptr_t = std::shared_ptr< CTopoGroup >
 
using PtrVector_t = std::vector< CTopoGroup::Ptr_t >
 
- Public Types inherited from dds::topology_api::CTopoContainer
typedef std::shared_ptr< CTopoContainerPtr_t
 
typedef std::vector< CTopoContainer::Ptr_tPtrVector_t
 
- Public Types inherited from dds::topology_api::CTopoElement
using Ptr_t = std::shared_ptr< CTopoElement >
 
using PtrVector_t = std::vector< CTopoElement::Ptr_t >
 
- Public Types inherited from dds::topology_api::CTopoBase
enum  EType {
  EType::TOPO_BASE, EType::TOPO_PROPERTY, EType::TOPO_ELEMENT, EType::TASK,
  EType::COLLECTION, EType::GROUP, EType::REQUIREMENT, EType::TOPO_VARS,
  EType::TRIGGER
}
 
using Ptr_t = std::shared_ptr< CTopoBase >
 
using PtrVector_t = std::vector< CTopoBase::Ptr_t >
 

Public Member Functions

 CTopoGroup (const std::string &_name)
 Constructor. More...
 
virtual ~CTopoGroup ()
 Destructor. More...
 
virtual size_t getNofTasks () const
 Inherited from TopoElement. More...
 
virtual size_t getTotalNofTasks () const
 Inherited from TopoElement. More...
 
void initFromPropertyTree (const boost::property_tree::ptree &_pt)
 Inherited from TopoBase. More...
 
void saveToPropertyTree (boost::property_tree::ptree &_pt)
 Inherited from TopoBase. More...
 
size_t getN () const
 
void setN (size_t _n)
 
CTopoElement::PtrVector_t getElementsByType (CTopoBase::EType _type) const
 
virtual std::string toString () const
 Returns string representation of an object. More...
 
virtual std::string hashString () const
 Inherited from TopoBase. More...
 
- Public Member Functions inherited from dds::topology_api::CTopoContainer
size_t getNofElements () const
 Return number of elements. More...
 
CTopoElement::Ptr_t getElement (size_t _i) const
 Return topology element by index. More...
 
const CTopoElement::PtrVector_tgetElements () const
 Return vector of elements. More...
 
CTopoElement::Ptr_t addElement (CTopoBase::EType _type, const std::string &_name)
 Adds TopoElement to a container using enum type. More...
 
template<class Object_t >
Object_t::Ptr_t addElement (const std::string &_name)
 Adds TopoElement to a container using specified type. CTopoTask, CTopoCollection and CTopoGroup are supported. More...
 
template<>
CTopoTask::Ptr_t addElement (const std::string &_name)
 
template<>
CTopoCollection::Ptr_t addElement (const std::string &_name)
 
template<>
CTopoGroup::Ptr_t addElement (const std::string &_name)
 
- Public Member Functions inherited from dds::topology_api::CTopoBase
void setName (const std::string &_name)
 Modifiers. More...
 
void setParent (CTopoBase *_parent)
 
const std::string & getName () const
 Accessors. More...
 
CTopoBase::EType getType () const
 
CTopoBasegetParent () const
 
std::string getPath () const
 Return full path to topo element or property. More...
 
void initFromXML (const std::string &_filepath, const std::string &_schemaFilepath="", std::string *_topologyName=nullptr)
 Initializes object with data from XML file. More...
 
void initFromXML (std::istream &_stream, const std::string &_schemaFilepath="", std::string *_topologyName=nullptr)
 Initializes object with data from XML input stream. More...
 

Friends

std::ostream & operator<< (std::ostream &_strm, const CTopoGroup &_taskContainer)
 Operator << for convenient output to ostream. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from dds::topology_api::CTopoBase
template<class Object_t >
static Object_t::Ptr_t make (const std::string &_objectName, const std::string &_filepath, const std::string &_schemaFilepath="", std::string *_topologyName=nullptr)
 Convenience API to create topology object from XML file. More...
 
template<class Object_t >
static Object_t::Ptr_t make (const std::string &_objectName, std::istream &_stream, const std::string &_schemaFilepath="", std::string *_topologyName=nullptr)
 Convenience API to create topology object from XML file. More...
 
template<class Object_t >
static Object_t::Ptr_t make (const std::string &_name, const boost::property_tree::ptree &_pt)
 Convenience API to create topology object with data from property tree. More...
 
- Protected Member Functions inherited from dds::topology_api::CTopoContainer
 CTopoContainer (const std::string &_name)
 Constructor. More...
 
virtual ~CTopoContainer ()
 Destructor. More...
 
size_t getNofTasksDefault () const
 Default implementation for TopoElement::getNofTasks, TopoElement::getTotalNofTasks. Calculate recursively number of tasks in all daughter elements. More...
 
bool canAddElement (CTopoBase::EType _type)
 Checks if element can be added to the container. TopoTask can be added to any container (TopoCollection or TopoGroup). TopoCollection can be added only to TopoGroup. TopoGroup can be added only to Main TopoGroup. More...
 
template<class Object_t >
Object_t::Ptr_t makeElement (const std::string &_name)
 Makes new topology element. More...
 
- Protected Member Functions inherited from dds::topology_api::CTopoElement
 CTopoElement (const std::string &_name)
 Constructor. More...
 
virtual ~CTopoElement ()
 Destructor. More...
 
size_t getTotalCounterDefault () const
 If parent is a group than return N, else return 1. Default implementation for Task::getTotalCounter and TaskCollection::getTotalCounter. More...
 
- Protected Member Functions inherited from dds::topology_api::CTopoBase
 CTopoBase (const std::string &_name)
 Constructor. More...
 
virtual ~CTopoBase ()
 Destructor. More...
 
void setType (CTopoBase::EType _type)
 

Member Typedef Documentation

◆ Ptr_t

◆ PtrVector_t

Constructor & Destructor Documentation

◆ CTopoGroup()

CTopoGroup::CTopoGroup ( const std::string &  _name)

Constructor.

◆ ~CTopoGroup()

CTopoGroup::~CTopoGroup ( )
virtual

Destructor.

Member Function Documentation

◆ getElementsByType()

CTopoElement::PtrVector_t CTopoGroup::getElementsByType ( CTopoBase::EType  _type) const

◆ getN()

size_t CTopoGroup::getN ( ) const

◆ getNofTasks()

size_t CTopoGroup::getNofTasks ( ) const
virtual

Inherited from TopoElement.

Implements dds::topology_api::CTopoElement.

◆ getTotalNofTasks()

size_t CTopoGroup::getTotalNofTasks ( ) const
virtual

Inherited from TopoElement.

Implements dds::topology_api::CTopoElement.

◆ hashString()

string CTopoGroup::hashString ( ) const
virtual

Inherited from TopoBase.

Implements dds::topology_api::CTopoBase.

◆ initFromPropertyTree()

void CTopoGroup::initFromPropertyTree ( const boost::property_tree::ptree &  _pt)
virtual

Inherited from TopoBase.

Implements dds::topology_api::CTopoBase.

◆ saveToPropertyTree()

void CTopoGroup::saveToPropertyTree ( boost::property_tree::ptree &  _pt)
virtual

Inherited from TopoBase.

Implements dds::topology_api::CTopoBase.

◆ setN()

void CTopoGroup::setN ( size_t  _n)

◆ toString()

string CTopoGroup::toString ( ) const
virtual

Returns string representation of an object.

Returns
String representation of an object.

Reimplemented from dds::topology_api::CTopoContainer.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  _strm,
const CTopoGroup _taskContainer 
)
friend

Operator << for convenient output to ostream.

Returns
Insertion stream in order to be able to call a succession of insertion operations.

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