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

#include <TopoCore.h>

Public Types

using IdSet_t = std::set< Id_t >
 Note that ID is of type uint_64. ID is calculated using CRC64 algorithm. More...
 
using IdPathToIdMap_t = std::map< std::string, Id_t >
 Task/Collection ID path to Task/Collection ID map. More...
 

Public Member Functions

 CTopoCore ()
 Constructor. More...
 
virtual ~CTopoCore ()
 Destructor. More...
 
void init (const std::string &_fileName)
 Initializes topology from specified file. More...
 
void init (const std::string &_fileName, const std::string &_schemaFileName)
 Initializes topology from specified file and validates with provided schema file. More...
 
void getDifference (const CTopoCore &_topology, IdSet_t &_removedTasks, IdSet_t &_removedCollections, IdSet_t &_addedTasks, IdSet_t &_addedCollections)
 Get difference between THIS topology and a new one. More...
 
void setXMLValidationDisabled (bool _val)
 
std::string getName () const
 Accessors. More...
 
std::string getFilepath () const
 
uint32_t getHash () const
 
CTopoGroup::Ptr_t getMainGroup () const
 
const STopoRuntimeTaskgetRuntimeTaskById (Id_t _id) const
 
const STopoRuntimeCollectiongetRuntimeCollectionById (Id_t _id) const
 
const STopoRuntimeTaskgetRuntimeTaskByIdPath (const std::string &_idPath) const
 
const STopoRuntimeCollectiongetRuntimeCollectionByIdPath (const std::string &_idPath) const
 
std::pair< size_t, size_t > getRequiredNofAgents (size_t _defaultNumSlots) const
 
size_t getTotalNofTasks () const
 
STopoRuntimeTask::FilterIteratorPair_t getRuntimeTaskIterator (const STopoRuntimeTask::Map_t &_map, STopoRuntimeTask::Condition_t _condition) const
 Iterators. More...
 
STopoRuntimeTask::FilterIteratorPair_t getRuntimeTaskIterator (STopoRuntimeTask::Condition_t _condition=nullptr) const
 
STopoRuntimeCollection::FilterIteratorPair_t getRuntimeCollectionIterator (STopoRuntimeCollection::Condition_t _condition=nullptr) const
 
STopoRuntimeTask::FilterIteratorPair_t getRuntimeTaskIteratorForPropertyName (const std::string &_propertyName, Id_t _taskId) const
 
STopoRuntimeTask::FilterIteratorPair_t getRuntimeTaskIteratorMatchingPath (const std::string &_pathPattern) const
 
STopoRuntimeCollection::FilterIteratorPair_t getRuntimeCollectionIteratorMatchingPath (const std::string &_pathPattern) const
 
const STopoRuntimeTask::Map_tgetIdToRuntimeTaskMap () const
 Accessors to internal data structures. Used for unit tests. More...
 
const STopoRuntimeCollection::Map_tgetIdToRuntimeCollectionMap () const
 
const IdPathToIdMap_tgetTaskIdPathToIdMap () const
 
const IdPathToIdMap_tgetCollectionIdPathToIdMap () const
 
std::string stringOfTasks (const IdSet_t &_ids) const
 
std::string stringOfCollections (const IdSet_t &_ids) const
 
virtual std::string toString () const
 Returns string representation of an object. More...
 

Friends

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

Member Typedef Documentation

◆ IdPathToIdMap_t

using dds::topology_api::CTopoCore::IdPathToIdMap_t = std::map<std::string, Id_t>

Task/Collection ID path to Task/Collection ID map.

◆ IdSet_t

Note that ID is of type uint_64. ID is calculated using CRC64 algorithm.

Constructor & Destructor Documentation

◆ CTopoCore()

CTopoCore::CTopoCore ( )

Constructor.

◆ ~CTopoCore()

CTopoCore::~CTopoCore ( )
virtual

Destructor.

Member Function Documentation

◆ getCollectionIdPathToIdMap()

const CTopoCore::IdPathToIdMap_t & CTopoCore::getCollectionIdPathToIdMap ( ) const

◆ getDifference()

void CTopoCore::getDifference ( const CTopoCore _topology,
IdSet_t _removedTasks,
IdSet_t _removedCollections,
IdSet_t _addedTasks,
IdSet_t _addedCollections 
)

Get difference between THIS topology and a new one.

Parameters
[in]_topologyNew topology to calculate the difference with.
[out]_removedTasksTasks which exist in THIS topology and don't exist in new one.
[out]_removedCollectionsCollections which exist in THIS topology and don't exist in new one.
[out]_addedTasksTasks which exist in new topology and don't exist in THIS one.
[out]_addedCollectionsCollections which exist in new topology and don't exist in THIS one.

◆ getFilepath()

std::string CTopoCore::getFilepath ( ) const

◆ getHash()

uint32_t CTopoCore::getHash ( ) const

◆ getIdToRuntimeCollectionMap()

const STopoRuntimeCollection::Map_t & CTopoCore::getIdToRuntimeCollectionMap ( ) const

◆ getIdToRuntimeTaskMap()

const STopoRuntimeTask::Map_t & CTopoCore::getIdToRuntimeTaskMap ( ) const

Accessors to internal data structures. Used for unit tests.

◆ getMainGroup()

CTopoGroup::Ptr_t CTopoCore::getMainGroup ( ) const

◆ getName()

std::string CTopoCore::getName ( ) const

Accessors.

◆ getRequiredNofAgents()

pair< size_t, size_t > CTopoCore::getRequiredNofAgents ( size_t  _defaultNumSlots) const

◆ getRuntimeCollectionById()

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

◆ getRuntimeCollectionByIdPath()

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

◆ getRuntimeCollectionIterator()

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

◆ getRuntimeCollectionIteratorMatchingPath()

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

◆ getRuntimeTaskById()

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

◆ getRuntimeTaskByIdPath()

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

◆ getRuntimeTaskIterator() [1/2]

STopoRuntimeTask::FilterIteratorPair_t CTopoCore::getRuntimeTaskIterator ( const STopoRuntimeTask::Map_t _map,
STopoRuntimeTask::Condition_t  _condition 
) const

Iterators.

◆ getRuntimeTaskIterator() [2/2]

STopoRuntimeTask::FilterIteratorPair_t dds::topology_api::CTopoCore::getRuntimeTaskIterator ( STopoRuntimeTask::Condition_t  _condition = nullptr) const

◆ getRuntimeTaskIteratorForPropertyName()

STopoRuntimeTask::FilterIteratorPair_t CTopoCore::getRuntimeTaskIteratorForPropertyName ( const std::string &  _propertyName,
Id_t  _taskId 
) const

◆ getRuntimeTaskIteratorMatchingPath()

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

◆ getTaskIdPathToIdMap()

const CTopoCore::IdPathToIdMap_t & CTopoCore::getTaskIdPathToIdMap ( ) const

◆ getTotalNofTasks()

size_t CTopoCore::getTotalNofTasks ( ) const

◆ init() [1/2]

void CTopoCore::init ( const std::string &  _fileName)

Initializes topology from specified file.

Exceptions
runtime_error

◆ init() [2/2]

void CTopoCore::init ( const std::string &  _fileName,
const std::string &  _schemaFileName 
)

Initializes topology from specified file and validates with provided schema file.

Exceptions
runtime_error

◆ setXMLValidationDisabled()

void CTopoCore::setXMLValidationDisabled ( bool  _val)

◆ stringOfCollections()

std::string CTopoCore::stringOfCollections ( const IdSet_t _ids) const

◆ stringOfTasks()

std::string CTopoCore::stringOfTasks ( const IdSet_t _ids) const

◆ toString()

string CTopoCore::toString ( ) const
virtual

Returns string representation of an object.

Returns
String representation of an object.

Friends And Related Function Documentation

◆ operator<<

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