DDS
ver. 3.6
|
#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... | |
using | Ptr_t = std::shared_ptr< CTopoCore > |
std::shared_ptr 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 | init (std::istream &_stream) |
Initializes topology from input stream. More... | |
void | init (std::istream &_stream, const std::string &_schemaFileName) |
Initializes topology from input stream 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 STopoRuntimeTask & | getRuntimeTaskById (Id_t _id) const |
Returns runtime task by ID. More... | |
const STopoRuntimeCollection & | getRuntimeCollectionById (Id_t _id) const |
Returns runtime collection by ID. More... | |
const STopoRuntimeTask & | getRuntimeTaskByIdPath (const std::string &_idPath) const |
Returns runtime task by runtime path. More... | |
const STopoRuntimeCollection & | getRuntimeCollectionByIdPath (const std::string &_idPath) const |
Returns runtime collection by runtime path. More... | |
const STopoRuntimeTask & | getRuntimeTask (const std::string &_path) const |
Returns runtime task by either ID or runtime path. More... | |
const STopoRuntimeCollection & | getRuntimeCollection (const std::string &_path) const |
Returns runtime collection by either ID or runtime path. More... | |
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_t & | getIdToRuntimeTaskMap () const |
Accessors to internal data structures. Used for unit tests. More... | |
const STopoRuntimeCollection::Map_t & | getIdToRuntimeCollectionMap () const |
const IdPathToIdMap_t & | getTaskIdPathToIdMap () const |
const IdPathToIdMap_t & | getCollectionIdPathToIdMap () 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... | |
using dds::topology_api::CTopoCore::IdPathToIdMap_t = std::map<std::string, Id_t> |
Task/Collection ID path to Task/Collection ID map.
using dds::topology_api::CTopoCore::IdSet_t = std::set<Id_t> |
Note that ID is of type uint_64. ID is calculated using CRC64 algorithm.
using dds::topology_api::CTopoCore::Ptr_t = std::shared_ptr<CTopoCore> |
std::shared_ptr
CTopoCore::CTopoCore | ( | ) |
Constructor.
|
virtual |
Destructor.
const CTopoCore::IdPathToIdMap_t & CTopoCore::getCollectionIdPathToIdMap | ( | ) | const |
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.
[in] | _topology | New topology to calculate the difference with. |
[out] | _removedTasks | Tasks which exist in THIS topology and don't exist in new one. |
[out] | _removedCollections | Collections which exist in THIS topology and don't exist in new one. |
[out] | _addedTasks | Tasks which exist in new topology and don't exist in THIS one. |
[out] | _addedCollections | Collections which exist in new topology and don't exist in THIS one. |
std::string CTopoCore::getFilepath | ( | ) | const |
uint32_t CTopoCore::getHash | ( | ) | const |
const STopoRuntimeCollection::Map_t & CTopoCore::getIdToRuntimeCollectionMap | ( | ) | const |
const STopoRuntimeTask::Map_t & CTopoCore::getIdToRuntimeTaskMap | ( | ) | const |
Accessors to internal data structures. Used for unit tests.
CTopoGroup::Ptr_t CTopoCore::getMainGroup | ( | ) | const |
std::string CTopoCore::getName | ( | ) | const |
Accessors.
pair< size_t, size_t > CTopoCore::getRequiredNofAgents | ( | size_t | _defaultNumSlots | ) | const |
const STopoRuntimeCollection & CTopoCore::getRuntimeCollection | ( | const std::string & | _path | ) | const |
Returns runtime collection by either ID or runtime path.
const STopoRuntimeCollection & CTopoCore::getRuntimeCollectionById | ( | Id_t | _id | ) | const |
Returns runtime collection by ID.
const STopoRuntimeCollection & CTopoCore::getRuntimeCollectionByIdPath | ( | const std::string & | _idPath | ) | const |
Returns runtime collection by runtime path.
STopoRuntimeCollection::FilterIteratorPair_t CTopoCore::getRuntimeCollectionIterator | ( | STopoRuntimeCollection::Condition_t | _condition = nullptr | ) | const |
STopoRuntimeCollection::FilterIteratorPair_t CTopoCore::getRuntimeCollectionIteratorMatchingPath | ( | const std::string & | _pathPattern | ) | const |
const STopoRuntimeTask & CTopoCore::getRuntimeTask | ( | const std::string & | _path | ) | const |
Returns runtime task by either ID or runtime path.
const STopoRuntimeTask & CTopoCore::getRuntimeTaskById | ( | Id_t | _id | ) | const |
Returns runtime task by ID.
const STopoRuntimeTask & CTopoCore::getRuntimeTaskByIdPath | ( | const std::string & | _idPath | ) | const |
Returns runtime task by runtime path.
STopoRuntimeTask::FilterIteratorPair_t CTopoCore::getRuntimeTaskIterator | ( | const STopoRuntimeTask::Map_t & | _map, |
STopoRuntimeTask::Condition_t | _condition | ||
) | const |
Iterators.
STopoRuntimeTask::FilterIteratorPair_t dds::topology_api::CTopoCore::getRuntimeTaskIterator | ( | STopoRuntimeTask::Condition_t | _condition = nullptr | ) | const |
STopoRuntimeTask::FilterIteratorPair_t CTopoCore::getRuntimeTaskIteratorForPropertyName | ( | const std::string & | _propertyName, |
Id_t | _taskId | ||
) | const |
STopoRuntimeTask::FilterIteratorPair_t CTopoCore::getRuntimeTaskIteratorMatchingPath | ( | const std::string & | _pathPattern | ) | const |
const CTopoCore::IdPathToIdMap_t & CTopoCore::getTaskIdPathToIdMap | ( | ) | const |
size_t CTopoCore::getTotalNofTasks | ( | ) | const |
void CTopoCore::init | ( | const std::string & | _fileName | ) |
Initializes topology from specified file.
runtime_error |
void CTopoCore::init | ( | const std::string & | _fileName, |
const std::string & | _schemaFileName | ||
) |
Initializes topology from specified file and validates with provided schema file.
runtime_error |
void CTopoCore::init | ( | std::istream & | _stream | ) |
Initializes topology from input stream.
runtime_error |
void CTopoCore::init | ( | std::istream & | _stream, |
const std::string & | _schemaFileName | ||
) |
Initializes topology from input stream and validates with provided schema file.
runtime_error |
void CTopoCore::setXMLValidationDisabled | ( | bool | _val | ) |
std::string CTopoCore::stringOfCollections | ( | const IdSet_t & | _ids | ) | const |
std::string CTopoCore::stringOfTasks | ( | const IdSet_t & | _ids | ) | const |
|
virtual |
Returns string representation of an object.
|
friend |
Operator << for convenient output to ostream.