DDS  ver. 2.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
dds::topology_api::CTopoBase Class Referenceabstract

#include <TopoBase.h>

Inheritance diagram for dds::topology_api::CTopoBase:
dds::topology_api::CRequirement dds::topology_api::CTopoElement dds::topology_api::CTopoProperty dds::topology_api::CTopoVars dds::topology_api::CTrigger dds::topology_api::CTask dds::topology_api::CTaskContainer dds::topology_api::CTaskCollection dds::topology_api::CTaskGroup

Public Member Functions

void setId (const std::string &_id)
 Modifiers. More...
 
void setParent (CTopoBase *_parent)
 
std::string getId () const
 Accessors. More...
 
ETopoType getType () const
 
CTopoBasegetParent () const
 
std::string getPath () const
 Return full path to topo element or property. More...
 
CTopoIndex getIndex () const
 Return index of topo element or property. More...
 
virtual void initFromPropertyTree (const std::string &_name, const boost::property_tree::ptree &_pt)=0
 Initialize object with data from property tree. More...
 
virtual std::string toString () const
 Returns string representation of an object. More...
 

Static Public Member Functions

static const boost::property_tree::ptree & findElement (ETopoType _type, const std::string &_name, const boost::property_tree::ptree &_pt)
 Helper function to find element in property tree by type and name. More...
 

Protected Member Functions

 CTopoBase ()
 Constructor. More...
 
virtual ~CTopoBase ()
 Destructor. More...
 
void setType (ETopoType _type)
 

Friends

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

Constructor & Destructor Documentation

◆ CTopoBase()

CTopoBase::CTopoBase ( )
protected

Constructor.

◆ ~CTopoBase()

CTopoBase::~CTopoBase ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ findElement()

const ptree & CTopoBase::findElement ( ETopoType  _type,
const std::string &  _name,
const boost::property_tree::ptree &  _pt 
)
static

Helper function to find element in property tree by type and name.

Parameters
[in]_typeType of the topo element we are looking for.
[in]_nameName of element we are looking for.
[in]_ptProperty tree.
Returns
Property tree with root node pointing to found element.
Exceptions
logic_errorif element was not found.
Note
This function does not catch exceptions from property tree.

◆ getId()

string CTopoBase::getId ( ) const

Accessors.

◆ getIndex()

CTopoIndex CTopoBase::getIndex ( ) const

Return index of topo element or property.

◆ getParent()

CTopoBase * CTopoBase::getParent ( ) const

◆ getPath()

string CTopoBase::getPath ( ) const

Return full path to topo element or property.

◆ getType()

ETopoType CTopoBase::getType ( ) const

◆ initFromPropertyTree()

virtual void dds::topology_api::CTopoBase::initFromPropertyTree ( const std::string &  _name,
const boost::property_tree::ptree &  _pt 
)
pure virtual

Initialize object with data from property tree.

Parameters
[in]_nameName of the object as in input file.
[in]_ptProperty tree starting from root.

Implemented in dds::topology_api::CTask, dds::topology_api::CTrigger, dds::topology_api::CTopoProperty, dds::topology_api::CRequirement, dds::topology_api::CTaskCollection, dds::topology_api::CTaskGroup, and dds::topology_api::CTopoVars.

◆ setId()

void CTopoBase::setId ( const std::string &  _id)

Modifiers.

◆ setParent()

void CTopoBase::setParent ( CTopoBase _parent)

◆ setType()

void CTopoBase::setType ( ETopoType  _type)
protected

◆ toString()

string CTopoBase::toString ( ) const
virtual

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  _strm,
const CTopoBase _element 
)
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: