|
|
| | ResourceCacheT (LoggerInstance &logger, ElementInitialiserT initialise=ElementInitialiserT{}, ElementCleanerT clean=ElementCleanerT{}, ElementMergerT merge=ElementMergerT{}) |
| |
| | ResourceCacheBaseT (ResourceCacheBaseT const &)=delete |
| |
| ResourceCacheBaseT & | operator= (ResourceCacheBaseT const &)=delete |
| |
| | ResourceCacheBaseT (ResourceCacheBaseT &&) noexcept=delete |
| |
| ResourceCacheBaseT & | operator= (ResourceCacheBaseT &&) noexcept=delete |
| |
| void | cleanup () noexcept |
| | Sets all the elements to be cleaned up.
|
| |
| void | clear () noexcept |
| | Flushes the collection.
|
| |
| template<typename ... ParametersT> |
| ElementPtrT | create (ElementKeyT const &name, ParametersT &&... parameters) const |
| | Creates an element.
|
| |
| ElementObsT | tryAdd (ElementKeyT const &name, ElementPtrT &element, bool initialise=false) |
| | Adds an element.
|
| |
| ElementObsT | tryAddNoLock (ElementKeyT const &name, ElementPtrT &element, bool initialise=false) |
| | Adds an element.
|
| |
| ElementObsT | add (ElementKeyT const &name, ElementPtrT &element, bool initialise=true) |
| | Logging version of tryAdd.
|
| |
| ElementObsT | addNoLock (ElementKeyT const &name, ElementPtrT &element, bool initialise=true) |
| | Logging version of tryAdd.
|
| |
| template<typename ... ParametersT> |
| ElementObsT | tryAddNew (ElementKeyT const &name, bool initialise, ElementObsT &created, ParametersT &&... parameters) |
| | Add an element, constructed in-place.
|
| |
| template<typename ... ParametersT> |
| ElementObsT | tryAddNewNoLock (ElementKeyT const &name, bool initialise, ElementObsT &created, ParametersT &&... parameters) |
| | Add an element, constructed in-place.
|
| |
| template<typename ... ParametersT> |
| ElementObsT | addNew (ElementKeyT const &name, ParametersT &&... parameters) |
| | Logging version of tryAdd.
|
| |
| template<typename ... ParametersT> |
| ElementObsT | addNewNoLock (ElementKeyT const &name, ParametersT &&... parameters) |
| | Logging version of tryAdd.
|
| |
| ElementPtrT | tryRemove (ElementKeyT const &name, bool cleanup=false) noexcept |
| | Removes an element, given a name.
|
| |
| ElementPtrT | tryRemoveNoLock (ElementKeyT const &name, bool cleanup=false) noexcept |
| | Removes an element, given a name.
|
| |
| ElementPtrT | remove (ElementKeyT const &name, bool cleanup=false) noexcept |
| | Logging version of tryRemove.
|
| |
| ElementPtrT | removeNoLock (ElementKeyT const &name, bool cleanup=false) noexcept |
| | Logging version of tryRemove.
|
| |
| void | rename (ElementKeyT const &oldName, ElementKeyT const &newName) |
| | Renames a resource.
|
| |
| ElementObsT | tryFind (ElementKeyT const &name) const noexcept |
| | Looks for an element with given name.
|
| |
| ElementObsT | tryFindNoLock (ElementKeyT const &name) const noexcept |
| | Looks for an element with given name.
|
| |
| ElementObsT | find (ElementKeyT const &name) const |
| | Logging version of tryRemove.
|
| |
| ElementObsT | findNoLock (ElementKeyT const &name) const |
| | Logging version of tryRemove.
|
| |
| void | mergeInto (ElementCacheBaseT &destination) |
| | Merges this cache's elements to the one given.
|
| |
| template<typename FuncType > |
| void | forEach (FuncType func) const |
| |
| template<typename FuncType > |
| void | forEach (FuncType func) |
| |
| uint32_t | getObjectCount () const noexcept |
| |
| uint32_t | getObjectCountNoLock () const noexcept |
| |
| String const & | getObjectTypeName () const noexcept |
| |
| bool | has (ElementKeyT const &name) const noexcept |
| |
| bool | hasNoLock (ElementKeyT const &name) const noexcept |
| |
| bool | isEmpty () const noexcept |
| |
| bool | isEmptyNoLock () const noexcept |
| |
| void | lock () const |
| |
| void | unlock () const noexcept |
| |
| auto | begin () noexcept |
| |
| auto | begin () const noexcept |
| |
| auto | end () noexcept |
| |
| auto | end () const noexcept |
| |
| void | reportCreation (String const &name) const |
| |
| void | reportAdded (String const &name) const |
| |
| void | reportDuplicate (String const &name) const |
| |
| void | reportNull () const |
| |
| void | reportUnknown (String const &name) const |
| |
|
| using | MutexT = castor::RecursiveMutex |
| |
| void | doCleanupNoLock () const noexcept |
| |
| void | doClearNoLock () noexcept |
| |
| template<typename ... ParametersT> |
| ElementPtrT | doCreateT (ElementKeyT const &name, ParametersT &&... parameters) const |
| |
| ElementObsT | doTryAddNoLock (ElementKeyT const &name, ElementPtrT &element, bool initialise=true) |
| |
| ElementObsT | doAddNoLock (ElementKeyT const &name, ElementPtrT &element, bool initialise=true) |
| |
| template<typename ... ParametersT> |
| ElementObsT | doTryAddNewNoLockT (ElementKeyT const &name, bool initialise, ElementObsT &created, ParametersT &&... parameters) |
| |
| template<typename ... ParametersT> |
| ElementObsT | doAddNewNoLockT (ElementKeyT const &name, ParametersT &&... parameters) |
| |
| ElementPtrT | doTryRemoveNoLock (ElementKeyT const &name, bool cleanup=false) noexcept |
| |
| ElementObsT | doTryFindNoLock (ElementKeyT const &name) const noexcept |
| |
| | ResourceCacheBaseT (LoggerInstance &logger, ElementInitialiserT initialise=ElementInitialiserT{}, ElementCleanerT clean=ElementCleanerT{}, ElementMergerT merge=ElementMergerT{}) |
| |
| virtual | ~ResourceCacheBaseT () noexcept=default |
| |
| LoggerInstance & | m_logger |
| |
| CheckedMutexT< MutexT > | m_mutex |
| |
| ElementContT | m_resources |
| |
| ElementInitialiserT | m_initialise |
| |
| ElementCleanerT | m_clean |
| |
| ElementMergerT | m_merge |
| |
template<typename ResT, typename KeyT, typename TraitsT>
class castor::ResourceCacheT< ResT, KeyT, TraitsT >
Base class for an element cache.