DDS  ver. 3.4
Public Member Functions | List of all members
dds::topology_api::CTopology Class Reference

#include <Topology.h>

Public Member Functions

 CTopology ()
 Default constructor. More...
 
 ~CTopology ()
 Destructor. More...
 
 CTopology (const std::string &_fileName)
 Constructs and initializes topology with the specified file without validation. More...
 
 CTopology (const std::string &_fileName, const std::string &_schemaFileName)
 Constructs and initializes topology with the specified file and validates against provided schema file. More...
 
std::string getName () const
 Returns topology name. More...
 
std::string getFilepath () const
 Returns topology filepath or empty string if topology is not initialized. More...
 
uint32_t getHash () const
 Returns topology hash. More...
 
CTopoGroup::Ptr_t getMainGroup () const
 Returns shared pointer to the main group of the topology. More...
 
const STopoRuntimeTaskgetRuntimeTaskById (Id_t _id) const
 Returns runtime task by ID. More...
 
const STopoRuntimeCollectiongetRuntimeCollectionById (Id_t _id) const
 Returns runtime collection by ID. More...
 
const STopoRuntimeTaskgetRuntimeTaskByIdPath (const std::string &_idPath) const
 Returns runtime task by path. More...
 
const STopoRuntimeCollectiongetRuntimeCollectionByIdPath (const std::string &_idPath) const
 Returns runtime collection by path. More...
 
STopoRuntimeTask::FilterIteratorPair_t getRuntimeTaskIterator (STopoRuntimeTask::Condition_t _condition=nullptr) const
 Returns runtime task filter iterator. More...
 
STopoRuntimeCollection::FilterIteratorPair_t getRuntimeCollectionIterator (STopoRuntimeCollection::Condition_t _condition=nullptr) const
 Returns runtime collection filter iterator. More...
 
STopoRuntimeTask::FilterIteratorPair_t getRuntimeTaskIteratorMatchingPath (const std::string &_pathPattern) const
 Returns runtime task filter iterator matching the task path in the topology. More...
 
STopoRuntimeCollection::FilterIteratorPair_t getRuntimeCollectionIteratorMatchingPath (const std::string &_pathPattern) const
 Returns runtime collection filter iterator matching the collection path in the topology. More...
 
std::pair< size_t, size_t > getRequiredNofAgents (size_t _defaultNumSlots) const
 Returns required number of agents and slots for the topology as std::pair. More...
 
size_t getRequiredNofAgents () const
 Returns required number of agents and slots for the topology as std::pair. More...
 
size_t getTotalNofTasks () const
 Returns total number of tasks in the topology. More...
 

Constructor & Destructor Documentation

◆ CTopology() [1/3]

CTopology::CTopology ( )

Default constructor.

◆ ~CTopology()

CTopology::~CTopology ( )

Destructor.

◆ CTopology() [2/3]

CTopology::CTopology ( const std::string &  _fileName)

Constructs and initializes topology with the specified file without validation.

Parameters
[in]_fileNamePath to the topology file
Exceptions
runtime_error

◆ CTopology() [3/3]

CTopology::CTopology ( const std::string &  _fileName,
const std::string &  _schemaFileName 
)

Constructs and initializes topology with the specified file and validates against provided schema file.

Parameters
[in]_fileNamePath to the topology file.
[in]_schemaFileNamePath to the XSD schema file.
Exceptions
runtime_error

Member Function Documentation

◆ getFilepath()

std::string CTopology::getFilepath ( ) const

Returns topology filepath or empty string if topology is not initialized.

◆ getHash()

uint32_t CTopology::getHash ( ) const

Returns topology hash.

Exceptions
runtime_error

◆ getMainGroup()

CTopoGroup::Ptr_t CTopology::getMainGroup ( ) const

Returns shared pointer to the main group of the topology.

◆ getName()

std::string CTopology::getName ( ) const

Returns topology name.

Exceptions
runtime_error

◆ getRequiredNofAgents() [1/2]

std::pair< size_t, size_t > CTopology::getRequiredNofAgents ( size_t  _defaultNumSlots) const

Returns required number of agents and slots for the topology as std::pair.

Warning
Limitations: this function might return a wrong results for topologies containing requirements and/or different number of tasks per collection. You might need to play with _defaultNumSlots to get a right result for those cases.
Parameters
[in]_defaultNumSlotsDefault number of slots per agent.
Returns
std::pair of a number of agents (first) and slots (second).

◆ getRequiredNofAgents() [2/2]

size_t CTopology::getRequiredNofAgents ( ) const

Returns required number of agents and slots for the topology as std::pair.

Warning
This finction is depricated, use std::pair<size_t, size_t> getRequiredNofAgents(size_t _defaultNumSlots) const instead

◆ getRuntimeCollectionById()

const STopoRuntimeCollection & CTopology::getRuntimeCollectionById ( Id_t  _id) const

Returns runtime collection by ID.

Parameters
[in]_idRuntime collection ID.

◆ getRuntimeCollectionByIdPath()

const STopoRuntimeCollection & CTopology::getRuntimeCollectionByIdPath ( const std::string &  _idPath) const

Returns runtime collection by path.

Parameters
[in]_idPathRuntime collection path in the topology.

◆ getRuntimeCollectionIterator()

STopoRuntimeCollection::FilterIteratorPair_t CTopology::getRuntimeCollectionIterator ( STopoRuntimeCollection::Condition_t  _condition = nullptr) const

Returns runtime collection filter iterator.

Parameters
[in]_conditionIf provided than iterate over collections passed the condition.

◆ getRuntimeCollectionIteratorMatchingPath()

STopoRuntimeCollection::FilterIteratorPair_t CTopology::getRuntimeCollectionIteratorMatchingPath ( const std::string &  _pathPattern) const

Returns runtime collection filter iterator matching the collection path in the topology.

Parameters
[in]_pathPatternRegex for collection path in the topology.

◆ getRuntimeTaskById()

const STopoRuntimeTask & CTopology::getRuntimeTaskById ( Id_t  _id) const

Returns runtime task by ID.

Parameters
[in]_idRuntime task ID.

◆ getRuntimeTaskByIdPath()

const STopoRuntimeTask & CTopology::getRuntimeTaskByIdPath ( const std::string &  _idPath) const

Returns runtime task by path.

Parameters
[in]_idPathRuntime task path in the topology.

◆ getRuntimeTaskIterator()

STopoRuntimeTask::FilterIteratorPair_t CTopology::getRuntimeTaskIterator ( STopoRuntimeTask::Condition_t  _condition = nullptr) const

Returns runtime task filter iterator.

Parameters
[in]_conditionIf provided than iterate over tasks passed the condition.

◆ getRuntimeTaskIteratorMatchingPath()

STopoRuntimeTask::FilterIteratorPair_t CTopology::getRuntimeTaskIteratorMatchingPath ( const std::string &  _pathPattern) const

Returns runtime task filter iterator matching the task path in the topology.

Parameters
[in]_pathPatternRegex for task path in the topology.

◆ getTotalNofTasks()

size_t CTopology::getTotalNofTasks ( ) const

Returns total number of tasks in the topology.


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