cvedia::rt::ObjectRegistry¶
Inherits from LockableObject
Public Functions¶
| Name | |
|---|---|
| expected< std::shared_ptr< T > > | registerObject(KeyType const & objectName, std::shared_ptr< T > object) |
| expected< void > | unregisterObject(KeyType const & objectName) |
| expected< void > | renameObject(KeyType const & oldId, KeyType const & newId) |
| NODISCARD expected< std::shared_ptr< T > > | getObject(KeyType const & objectName) const |
| bool | hasObject(KeyType const & objectName) const |
| std::unordered_set< std::shared_ptr< T > > | getObjects() const |
| std::unordered_set< KeyType > | getObjectKeys() const |
| int | getObjectCount() const |
| NODISCARD expected< void > | clearObjects() |
| std::unique_lock< std::recursive_mutex > | lockMutationsForTesting() |
| NODISCARD expected< void > | unregisterObjectForTesting(KeyType const & objectName, std::function< void()> afterRegistryErase) |
Additional inherited members¶
Public Functions inherited from LockableObject
| Name | |
|---|---|
| LockableObject() =default | |
| LockableObject(LockableObject const & other) =delete | |
| LockableObject & | operator=(LockableObject const & other) =delete |
| LockableObject(LockableObject && other) =delete | |
| LockableObject & | operator=(LockableObject && other) =delete |
| std::unique_lock< shared_mutex_class > | getWriteLock() const |
| std::shared_lock< shared_mutex_class > | getReadLock() const |
| std::unique_lock< shared_mutex_class > | getWriteLockAdopt() const |
| std::shared_lock< shared_mutex_class > | getReadLockAdopt() const |
| std::unique_lock< shared_mutex_class > | getWriteLockDefer() const |
| std::shared_lock< shared_mutex_class > | getReadLockDefer() const |
| shared_mutex_class & | getMutex() const |
Detailed Description¶
template <class T ,
class KeyType =std::string>
class cvedia::rt::ObjectRegistry;
Public Functions Documentation¶
function registerObject¶
expected< std::shared_ptr< T > > registerObject(
KeyType const & objectName,
std::shared_ptr< T > object
)
function unregisterObject¶
expected< void > unregisterObject(
KeyType const & objectName
)
function renameObject¶
expected< void > renameObject(
KeyType const & oldId,
KeyType const & newId
)
function getObject¶
NODISCARD expected< std::shared_ptr< T > > getObject(
KeyType const & objectName
) const
function hasObject¶
bool hasObject(
KeyType const & objectName
) const
function getObjects¶
std::unordered_set< std::shared_ptr< T > > getObjects() const
function getObjectKeys¶
std::unordered_set< KeyType > getObjectKeys() const
function getObjectCount¶
int getObjectCount() const
function clearObjects¶
NODISCARD expected< void > clearObjects()
function lockMutationsForTesting¶
inline std::unique_lock< std::recursive_mutex > lockMutationsForTesting()
function unregisterObjectForTesting¶
NODISCARD expected< void > unregisterObjectForTesting(
KeyType const & objectName,
std::function< void()> afterRegistryErase
)