diff --git a/src/proc/asset.cpp b/src/proc/asset.cpp index 44af7ae67..dd98bc7a4 100644 --- a/src/proc/asset.cpp +++ b/src/proc/asset.cpp @@ -48,24 +48,28 @@ namespace asset { Asset::Ident::Ident(const string& n, const Category& cat, const string& o, const uint ver) - : name(util::sanitise (n)), - category(cat), org(o), version(ver) - { } + : name(util::sanitise (n)) + , category(cat) + , org(o) + , version(ver) + { } /** Asset is a Interface class; usually, objects of - * concrete subclasses are created via specialized Factories + * concrete subclasses are created via specialised Factories */ Asset::Asset (const Ident& idi) - : ident(idi), id(AssetManager::reg (this, idi)), enabled(true) - { - TRACE (assetmem, "ctor Asset(id=%lu) : adr=%p %s", size_t(id), this, cStr(this->ident) ); - } + : ident(idi) + , id(AssetManager::reg (this, idi)) + , enabled(true) + { + TRACE (assetmem, "ctor Asset(id=%lu) : adr=%p %s", size_t(id), this, cStr(this->ident) ); + } Asset::~Asset () - { - TRACE (assetmem, "dtor Asset(id=%lu) : adr=%p", size_t(id), this ); - } + { + TRACE (assetmem, "dtor Asset(id=%lu) : adr=%p", size_t(id), this ); + } Asset::Ident::operator string () const diff --git a/src/proc/asset/sequence.hpp b/src/proc/asset/sequence.hpp index 9f895ce36..c24cfd3c0 100644 --- a/src/proc/asset/sequence.hpp +++ b/src/proc/asset/sequence.hpp @@ -64,13 +64,13 @@ namespace mobject { namespace session { class Track; + typedef MORef RTrack; }} namespace asset { - typedef mobject::MORef RTrack; /** * TODO type comment @@ -78,6 +78,7 @@ namespace asset { class Sequence : public Struct { + typedef mobject::session::RTrack RTrack; public: void detach() { TODO("Session-Sequence registration"); } diff --git a/src/proc/asset/struct-factory-impl.hpp b/src/proc/asset/struct-factory-impl.hpp index f27b32347..59a61deba 100644 --- a/src/proc/asset/struct-factory-impl.hpp +++ b/src/proc/asset/struct-factory-impl.hpp @@ -62,6 +62,8 @@ using mobject::Session; using mobject::MObject; using mobject::session::Scope; using mobject::session::match_specificTrack; +using mobject::session::RBinding; +using mobject::session::RTrack; using lib::Symbol; using util::isnil; diff --git a/src/proc/asset/timeline.hpp b/src/proc/asset/timeline.hpp index ee60508ef..50937591f 100644 --- a/src/proc/asset/timeline.hpp +++ b/src/proc/asset/timeline.hpp @@ -58,6 +58,7 @@ #include "proc/mobject/mobject-ref.hpp" //#include "proc/mobject/session/binding.hpp" ////TODO avoidable?? //#include "lib/p.hpp" +#include "lib/element-tracker.hpp" //#include @@ -70,12 +71,12 @@ namespace mobject { namespace session { class Binding; + typedef MORef RBinding; }} namespace asset { - typedef mobject::MORef RBinding; ////TODO why defining this into namespace asset? shouldn't it go into mobject::session ?? // using lumiera::P; @@ -85,6 +86,8 @@ namespace asset { class Timeline : public Struct { + typedef mobject::session::RBinding RBinding; + RBinding boundSeqence_; public: diff --git a/src/proc/assetmanager.cpp b/src/proc/assetmanager.cpp index dcd18b7b7..8e562dc26 100644 --- a/src/proc/assetmanager.cpp +++ b/src/proc/assetmanager.cpp @@ -103,11 +103,11 @@ namespace asset { /** * registers an asset object in the internal DB, providing its unique key. * This includes creating the smart ptr in charge of the asset's lifecycle + * @throw error::Invalid in case of invalid identity spec */ template ID AssetManager::reg (KIND* obj, const Asset::Ident& idi) - throw(lumiera::error::Invalid) { AssetManager& _aMang (AssetManager::instance()); DB& registry (_aMang.registry); @@ -123,14 +123,13 @@ namespace asset { } - /** find and return the object registered with the given ID. - * @throws Invalid if nothing is found or if the actual KIND - * of the stored object differs and can't be casted. + /** @note the KIND of asset needs to be assignable by the actual stored asset + * @throw error::Invalid if nothing is found or if the actual KIND + * of the stored object differs and can't be casted. */ template P AssetManager::getAsset (const ID& id) - throw(lumiera::error::Invalid) { if (P obj = registry.get (id)) return obj; @@ -204,7 +203,7 @@ namespace asset { AssetManager::remove (IDA id) { PAsset asset = getAsset (id); - for_each (asset->dependants, detach_child_recursively()); + for_each (asset->dependants, detach_child_recursively()); ///// asset->unlink(); registry.del(id); } diff --git a/src/proc/assetmanager.hpp b/src/proc/assetmanager.hpp index 6f5c29c10..51b7b416b 100644 --- a/src/proc/assetmanager.hpp +++ b/src/proc/assetmanager.hpp @@ -21,11 +21,13 @@ */ /** @file assetmanager.hpp - ** Proc-Layer Interface: Asset Lookup and Organization. + ** Proc-Layer Interface: Asset Lookup and Organisation. ** Declares the AssetManager interface used to access individual ** Asset instances. ** - ** These classes are placed into namespace asset and proc_interface. + ** These classes are placed into namespace asset and proc_interface. + ** + ** @todo 10/10 meanwhile I'm unhappy with some aspects of this implementation //////////////TICKET #691 ** ** @see asset.hpp ** @see mobject.hpp @@ -79,7 +81,7 @@ namespace asset { /** find and return corresponding object */ template - P getAsset (const ID& id) throw(lumiera::error::Invalid); + P getAsset (const ID& id); /** @return true if the given id is registered in the internal asset DB */ @@ -102,8 +104,8 @@ namespace asset { * @internal used by the Asset base class ctor to create Asset::id. */ template - static ID reg (KIND* obj, const Asset::Ident& idi) - throw(lumiera::error::Invalid); + static ID + reg (KIND* obj, const Asset::Ident& idi); /** deleter function used by the Asset smart pointers to delete Asset objects */ static void destroy (Asset* aa) { delete aa; } diff --git a/tests/components/proc/mobject/session/session-modify-parts-test.cpp b/tests/components/proc/mobject/session/session-modify-parts-test.cpp index 6c49bf2b5..0fe02991d 100644 --- a/tests/components/proc/mobject/session/session-modify-parts-test.cpp +++ b/tests/components/proc/mobject/session/session-modify-parts-test.cpp @@ -58,7 +58,6 @@ namespace test { // using asset::PTimeline; using asset::PSequence; using asset::Sequence; - using asset::RTrack; // using lumiera::Time; using lumiera::Query; diff --git a/tests/components/proc/mobject/session/session-structure-test.cpp b/tests/components/proc/mobject/session/session-structure-test.cpp index 6844e29d4..5f725c0e5 100644 --- a/tests/components/proc/mobject/session/session-structure-test.cpp +++ b/tests/components/proc/mobject/session/session-structure-test.cpp @@ -46,7 +46,6 @@ namespace test { using asset::PTimeline; using asset::PSequence; - using asset::RTrack; using lumiera::Time; diff --git a/tests/components/proc/mobject/session/timeline-sequence-handling-test.cpp b/tests/components/proc/mobject/session/timeline-sequence-handling-test.cpp index 4651a96bd..190d9bc2a 100644 --- a/tests/components/proc/mobject/session/timeline-sequence-handling-test.cpp +++ b/tests/components/proc/mobject/session/timeline-sequence-handling-test.cpp @@ -53,8 +53,6 @@ namespace test { using asset::PTimeline; using asset::Sequence; using asset::PSequence; - using asset::RBinding; - using asset::RTrack; using asset::Pipe; using lumiera::Query;