|
Ocean
|
The class implements the manager for test data collections as a singleton object. More...
#include <TestDataManager.h>
Public Types | |
| using | ScopedSubscription = ScopedSubscriptionT< std::string, TestDataManager > |
| Definition of a scoped subscription object for for data collections. | |
| using | ScopedSubscriptions = std::vector< ScopedSubscription > |
| Definition of a vector holding scoped subscription objects. | |
Public Member Functions | |
| SharedTestDataCollection | testDataCollection (const std::string &name) const |
| Returns a specific test data collection. | |
| ScopedSubscription | registerTestDataCollection (const std::string &name, std::unique_ptr< TestDataCollection > &&testDataCollection) |
| Registers a new test data collection. | |
Protected Types | |
| using | TestDataCollectionPair = std::pair< unsigned int, std::shared_ptr< TestDataCollection > > |
| Definition of a pair combining a counter with a shared pointer. | |
| using | TestDataCollectionMap = std::unordered_map< std::string, TestDataCollectionPair > |
| Definition of an unordered map mapping collection names to collection objects. | |
Protected Member Functions | |
| TestDataManager () | |
| Protected default constructor. | |
| void | unregisterTestDataCollection (const std::string &name) |
| Unregisters a registered data collection. | |
Protected Member Functions inherited from Ocean::Singleton< TestDataManager > | |
| Singleton ()=default | |
| Default constructor. | |
Protected Attributes | |
| TestDataCollectionMap | testDataCollectionMap_ |
| The map mapping collection names to collection objects. | |
| Lock | lock_ |
| The manager's lock. | |
Friends | |
| class | Singleton< TestDataManager > |
| class | TestDataCollection |
Additional Inherited Members | |
Static Public Member Functions inherited from Ocean::Singleton< TestDataManager > | |
| static TestDataManager & | get () |
| Returns a reference to the unique object. | |
The class implements the manager for test data collections as a singleton object.
| using Ocean::Test::TestDataManager::ScopedSubscription = ScopedSubscriptionT<std::string, TestDataManager> |
Definition of a scoped subscription object for for data collections.
| using Ocean::Test::TestDataManager::ScopedSubscriptions = std::vector<ScopedSubscription> |
Definition of a vector holding scoped subscription objects.
|
protected |
Definition of an unordered map mapping collection names to collection objects.
|
protected |
Definition of a pair combining a counter with a shared pointer.
|
protected |
Protected default constructor.
| ScopedSubscription Ocean::Test::TestDataManager::registerTestDataCollection | ( | const std::string & | name, |
| std::unique_ptr< TestDataCollection > && | testDataCollection | ||
| ) |
Registers a new test data collection.
| name | The name of the new collection, be valid, must not exist already |
| testDataCollection | The new test data collection to register, must be valid |
| SharedTestDataCollection Ocean::Test::TestDataManager::testDataCollection | ( | const std::string & | name | ) | const |
Returns a specific test data collection.
| name | The name of the test data collection to return, must be valid |
|
protected |
Unregisters a registered data collection.
| name | The name of the data collection to unregister, must be valid |
|
friend |
|
friend |
|
mutableprotected |
The manager's lock.
|
protected |
The map mapping collection names to collection objects.