![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "steam/assetmanager.hpp"
Facade for the Asset subsystem.
Definition at line 68 of file assetmanager.hpp.
Static Public Attributes | |
| static lib::Depend< AssetManager > | instance |
| get at the system-wide asset manager instance. | |
Static Public Member Functions | |
| static ID< Asset > | getID (const Asset::Ident &) |
| provide the unique ID for given Asset::Ident tuple | |
| template<class KIND > | |
| static lib::P< KIND > | wrap (const KIND &asset) |
| retrieve the registered smart-ptr for any asset | |
Public Member Functions | |
| template<class KIND > | |
| lib::P< KIND > | getAsset (const ID< KIND > &id) |
| find and return corresponding object | |
| bool | known (IDA id) |
| bool | known (IDA id, const Category &cat) |
| void | remove (IDA id) |
| remove the given asset from the internal DB. | |
| void | clear () |
| deregister and evict all known Assets. | |
| list< PcAsset > | listContent () const |
| extract a sorted list of all registered Assets | |
Friends | |
| class | lib::DependencyFactory< AssetManager > |
Protected Member Functions | |
| friend | Asset::Asset (Asset::Ident const &idi) |
| AssetManager () | |
Static Protected Member Functions | |
| template<class KIND > | |
| static ID< KIND > | reg (KIND *obj, const Asset::Ident &idi) |
| registers an asset object in the internal DB, providing its unique key. | |
| static void | destroy (Asset *aa) |
| deleter function used by the Asset smart pointers to delete Asset objects | |
Private Attributes | |
| asset::DB & | registry |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
|
protected |
Definition at line 90 of file assetmanager.cpp.
|
static |
provide the unique ID for given Asset::Ident tuple
Definition at line 98 of file assetmanager.cpp.
References steam::asset::hash_value().
Referenced by MediaFactory::operator()(), and AssetManager::reg().
Here is the call graph for this function:
Here is the caller graph for this function:retrieve the registered smart-ptr for any asset
Convenience shortcut for fetching the registered smart-ptr which is in charge of the given asset instance.
By querying directly asset.id (of type ID<Asset>), the call to registry.get() can bypass the dynamic cast, because the type of the asset is explicitly given by type KIND.
Definition at line 153 of file assetmanager.cpp.
References DB::get(), AssetManager::instance, AssetManager::known(), and AssetManager::registry.
Referenced by Builder< ErrorLog >::commit(), Asset::defineDependency(), Asset::defineDependency(), Clip::findClipAsset(), Clip::getClipAsset(), and Clip::getMedia().
Here is the call graph for this function:
Here is the caller graph for this function:find and return corresponding object
| error::Invalid | if nothing is found or if the actual KIND of the stored object differs and can't be casted. |
Definition at line 134 of file assetmanager.cpp.
References DB::get(), AssetManager::known(), and AssetManager::registry.
Referenced by IdentityOfAssets_test::createDuplicate(), CreateAsset_test::createMedia(), MediaFactory::operator()(), and AssetManager::remove().
Here is the call graph for this function:
Here is the caller graph for this function:| bool known | ( | IDA | id | ) |
Definition at line 167 of file assetmanager.cpp.
References DB::get(), and AssetManager::registry.
Referenced by IdentityOfAssets_test::createDuplicate(), CreateAsset_test::createMedia(), BasicPipe_test::dependProcPatt(), AssetManager::getAsset(), TimelineSequenceHandling_test::indirect_SequenceHandling(), MediaFactory::operator()(), DeleteClip_test::run(), SessionElementTracker_test::verify_integration(), TimelineSequenceHandling_test::verify_removalBinding(), TimelineSequenceHandling_test::verify_removalSequence(), TimelineSequenceHandling_test::verify_removalTimeline(), DefsManager_test::verifyRemoval(), and AssetManager::wrap().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 178 of file assetmanager.cpp.
References DB::get(), and AssetManager::registry.
Here is the call graph for this function:| void remove | ( | IDA | id | ) |
remove the given asset from the internal DB.
remove the given asset from the internal DB together with all its dependents
together with all its dependents.
Definition at line 205 of file assetmanager.cpp.
References DB::del(), AssetManager::getAsset(), and AssetManager::registry.
Referenced by BasicPipe_test::dependProcPatt(), SessionElementTracker_test::verify_integration(), TimelineSequenceHandling_test::verify_removalSequence(), TimelineSequenceHandling_test::verify_removalTimeline(), and DefsManager_test::verifyRemoval().
Here is the call graph for this function:
Here is the caller graph for this function:| void clear | ( | ) |
deregister and evict all known Assets.
Definition at line 215 of file assetmanager.cpp.
References DB::clear(), and AssetManager::registry.
Here is the call graph for this function:| list< PcAsset > listContent | ( | ) | const |
extract a sorted list of all registered Assets
Definition at line 223 of file assetmanager.cpp.
References DB::asList(), and AssetManager::registry.
Here is the call graph for this function:
|
staticprotected |
registers an asset object in the internal DB, providing its unique key.
used by the Asset base class ctor to create Asset::id.
This includes creating the smart ptr in charge of the asset's lifecycle
| error::Invalid | in case of invalid identity spec |
Definition at line 112 of file assetmanager.cpp.
References AssetManager::destroy(), AssetManager::getID(), AssetManager::instance, DB::put(), and AssetManager::registry.
Here is the call graph for this function:
|
inlinestaticprotected |
deleter function used by the Asset smart pointers to delete Asset objects
Definition at line 121 of file assetmanager.hpp.
Referenced by AssetManager::reg().
Here is the caller graph for this function:
|
protected |
|
private |
Definition at line 71 of file assetmanager.hpp.
Referenced by AssetManager::clear(), AssetManager::getAsset(), AssetManager::known(), AssetManager::known(), AssetManager::listContent(), AssetManager::reg(), AssetManager::remove(), and AssetManager::wrap().
|
static |
get at the system-wide asset manager instance.
Implemented as singleton.
Definition at line 75 of file assetmanager.hpp.
Referenced by Sequence::create(), Timeline::create(), IdentityOfAssets_test::createDuplicate(), CreateAsset_test::createMedia(), CreateAsset_test::createMetaAssets(), BasicPipe_test::dependProcPatt(), steam::asset::anonymous_namespace{assetmanager.cpp}::detach_child_recursively(), steam::asset::dumpAssetManager(), ErrorLog::global(), TimelineSequenceHandling_test::indirect_SequenceHandling(), Pipe::lookup(), StructFactory::made4fake(), ProcPatt::newCopy(), StructFactory::newInstance(), StructFactory::newPipe(), MediaFactory::operator()(), MediaFactory::operator()(), StructFactory::operator()(), TestAsset< A >::ptrFromThis(), AssetManager::reg(), DeleteClip_test::run(), Asset::unlink(), SessionElementTracker_test::verify_integration(), TimelineSequenceHandling_test::verify_removalBinding(), TimelineSequenceHandling_test::verify_removalSequence(), TimelineSequenceHandling_test::verify_removalTimeline(), DefsManager_test::verifyRemoval(), and AssetManager::wrap().
|
friend |
Definition at line 125 of file assetmanager.hpp.
Inheritance diagram for AssetManager:
Collaboration diagram for AssetManager: