clean-up visibility of lib::P

this was introduced into namespace mobject and spread from there.
Since the habit is to use more specific typedefs like PClip,
it is preferrable to spell out the full namespace
This commit is contained in:
Fischlurch 2015-07-02 19:16:46 +02:00
parent f88236319f
commit 1c8cddba84
41 changed files with 107 additions and 108 deletions

View file

@ -37,7 +37,6 @@ namespace lumiera{
namespace query { namespace query {
using lib::P;
using lumiera::Query; using lumiera::Query;
using boost::scoped_ptr; using boost::scoped_ptr;
@ -73,14 +72,14 @@ namespace query {
* is considered \e misconfiguration. * is considered \e misconfiguration.
*/ */
template<class TAR> template<class TAR>
P<TAR> operator() (Query<TAR> const&); lib::P<TAR> operator() (Query<TAR> const&);
/** search through the registered defaults, never create anything. /** search through the registered defaults, never create anything.
* @return object fulfilling the query, \c empty ptr if not found. * @return object fulfilling the query, \c empty ptr if not found.
*/ */
template<class TAR> template<class TAR>
P<TAR> search (Query<TAR> const&); lib::P<TAR> search (Query<TAR> const&);
/** retrieve an object fulfilling the query and register it as default. /** retrieve an object fulfilling the query and register it as default.
* The resolution is delegated to the ConfigQuery system (which may cause * The resolution is delegated to the ConfigQuery system (which may cause
@ -88,7 +87,7 @@ namespace query {
* @return object fulfilling the query, \c empty ptr if no solution. * @return object fulfilling the query, \c empty ptr if no solution.
*/ */
template<class TAR> template<class TAR>
P<TAR> create (Query<TAR> const&); lib::P<TAR> create (Query<TAR> const&);
/** register the given object as default, after ensuring it fulfils the /** register the given object as default, after ensuring it fulfils the
* query. The latter may cause some properties of the object to be set, * query. The latter may cause some properties of the object to be set,
@ -97,13 +96,13 @@ namespace query {
* @note only a weak ref to the object is stored * @note only a weak ref to the object is stored
*/ */
template<class TAR> template<class TAR>
bool define (P<TAR> const&, Query<TAR> const& =Query<TAR>()); bool define (lib::P<TAR> const&, Query<TAR> const& =Query<TAR>());
/** remove the defaults registration of the given object, if there was such /** remove the defaults registration of the given object, if there was such
* @return false if nothing has been changed because the object wasn't registered * @return false if nothing has been changed because the object wasn't registered
*/ */
template<class TAR> template<class TAR>
bool forget (P<TAR> const&); bool forget (lib::P<TAR> const&);
/** @internal for session lifecycle */ /** @internal for session lifecycle */

View file

@ -121,13 +121,13 @@ namespace lumiera {
}; };
typedef lib::IterSource<proc::mobject::ModelPort>::iterator ModelPorts; using ModelPorts = lib::IterSource<proc::mobject::ModelPort>::iterator;
typedef lib::IterSource<proc::mobject::OutputDesignation>::iterator Pipes; using Pipes = lib::IterSource<proc::mobject::OutputDesignation>::iterator;
typedef proc::play::POutputManager Output; using Output = proc::play::POutputManager;
typedef proc::mobject::session::PClipMO Clip; using Clip = proc::mobject::session::PClip;
typedef proc::mobject::PFork Fork; using Fork = proc::mobject::PFork;
typedef proc::asset::PTimeline Timeline; using Timeline = proc::asset::PTimeline;
typedef proc::asset::PViewer Viewer; using Viewer = proc::asset::PViewer;
/* ==== convenience shortcuts for common use cases ==== */ /* ==== convenience shortcuts for common use cases ==== */

View file

@ -87,7 +87,6 @@ namespace asset {
using std::static_pointer_cast; using std::static_pointer_cast;
using lib::HashVal; using lib::HashVal;
using lib::P;
@ -119,8 +118,8 @@ namespace asset {
class Asset; class Asset;
class AssetManager; class AssetManager;
typedef const ID<Asset>& IDA; typedef const ID<Asset>& IDA;
typedef P<Asset> PAsset; typedef lib::P<Asset> PAsset;
typedef P<const Asset> PcAsset; typedef lib::P<const Asset> PcAsset;

View file

@ -44,15 +44,14 @@ using std::string;
namespace proc { namespace proc {
namespace asset { namespace asset {
using lib::P;
using lib::Symbol; using lib::Symbol;
using lib::Literal; using lib::Literal;
class Proc; class Proc;
class ProcPatt; class ProcPatt;
typedef P<const asset::Proc> PProc; using PProc = lib::P<const asset::Proc>;
typedef P<const asset::ProcPatt> PProcPatt; using PProcPatt = lib::P<const asset::ProcPatt>;
static Symbol CURRENT = "current"; static Symbol CURRENT = "current";

View file

@ -49,7 +49,7 @@ namespace asset {
mediaref.ident.version ); mediaref.ident.version );
} }
Media::PClipMO Media::PClip
createClipMO (const Clip& thisClipAsset, const Media& mediaChannel) createClipMO (const Clip& thisClipAsset, const Media& mediaChannel)
{ {
return mobject::MObject::create (thisClipAsset,mediaChannel); return mobject::MObject::create (thisClipAsset,mediaChannel);
@ -64,9 +64,9 @@ namespace asset {
mediaref.getLength()) mediaref.getLength())
, source_ (mediaref) , source_ (mediaref)
, clipMO_ (createClipMO (*this, source_)) , clipMO_ (createClipMO (*this, source_))
{ {
this->defineDependency (mediaref); this->defineDependency (mediaref);
} }
/** Specialisation of the asset::Media interface method, /** Specialisation of the asset::Media interface method,
@ -76,7 +76,7 @@ namespace asset {
* Placements or no placement at all (meaning it need not * Placements or no placement at all (meaning it need not
* be placed within the session) * be placed within the session)
*/ */
Media::PClipMO Media::PClip
Clip::createClip () const Clip::createClip () const
{ {
return clipMO_; return clipMO_;
@ -87,7 +87,7 @@ namespace asset {
/** return this wrapped into a shared ptr, /** return this wrapped into a shared ptr,
* because it's already the desired asset::Clip * because it's already the desired asset::Clip
*/ */
Media::PClip Media::PClipAsset
Clip::getClipAsset () Clip::getClipAsset ()
{ {
return AssetManager::wrap (*this); return AssetManager::wrap (*this);

View file

@ -42,21 +42,21 @@ namespace asset {
const Media& source_; const Media& source_;
/** the corresponding (dependent) clip-MO */ /** the corresponding (dependent) clip-MO */
PClipMO clipMO_; PClip clipMO_;
public: public:
virtual PClipMO createClip () const; virtual PClip createClip () const;
protected: protected:
Clip (Media& mediaref); Clip (Media& mediaref);
friend class MediaFactory; friend class MediaFactory;
virtual PClip getClipAsset (); virtual PClipAsset getClipAsset ();
virtual PMedia checkCompound () const; virtual PMedia checkCompound () const;
}; };
typedef P<const asset::Clip> PClipAsset; typedef lib::P<const asset::Clip> PClipAsset;
const string CLIP_SUBFOLDER = "clips"; // TODO: handling of hard-wired constants.... const string CLIP_SUBFOLDER = "clips"; // TODO: handling of hard-wired constants....

View file

@ -107,7 +107,7 @@ namespace asset {
public: public:
template<class KIND> template<class KIND>
P<KIND> lib::P<KIND>
get (ID<KIND> hash) const get (ID<KIND> hash) const
{ {
return dynamic_pointer_cast<KIND,Asset> (find (hash)); return dynamic_pointer_cast<KIND,Asset> (find (hash));
@ -115,7 +115,7 @@ namespace asset {
template<class KIND> template<class KIND>
void void
put (ID<KIND> hash, P<KIND>& ptr) put (ID<KIND> hash, lib::P<KIND>& ptr)
{ {
table[hash] = static_pointer_cast (ptr); table[hash] = static_pointer_cast (ptr);
} }

View file

@ -41,7 +41,7 @@ namespace asset {
{}; {};
typedef P<Inventory> PInv; typedef lib::P<Inventory> PInv;
}} // namespace proc::asset }} // namespace proc::asset

View file

@ -75,11 +75,11 @@ namespace asset {
Media::PClipMO Media::PClip
Media::createClip () Media::createClip ()
{ {
PClip clipAsset (getClipAsset()); PClipAsset clipAsset (getClipAsset());
PClipMO clipMO = clipAsset->createClip(); PClip clipMO = clipAsset->createClip();
ENSURE (clipMO->isValid()); ENSURE (clipMO->isValid());
return clipMO; return clipMO;
@ -90,7 +90,7 @@ namespace asset {
* or to get the right reference to some already existing asset::Clip, * or to get the right reference to some already existing asset::Clip,
* especially when this media is part of a compound (multichannel) media. * especially when this media is part of a compound (multichannel) media.
*/ */
Media::PClip Media::PClipAsset
Media::getClipAsset () Media::getClipAsset ()
{ {
if (PMedia parent = this->checkCompound()) if (PMedia parent = this->checkCompound())
@ -228,7 +228,7 @@ namespace asset {
* @throw Invalid if the given media asset is not top-level, * @throw Invalid if the given media asset is not top-level,
* but rather part or a multichannel (compound) media * but rather part or a multichannel (compound) media
*/ */
P<Clip> lib::P<Clip>
MediaFactory::operator() (Media& mediaref) MediaFactory::operator() (Media& mediaref)
{ {
if (mediaref.checkCompound()) if (mediaref.checkCompound())

View file

@ -75,10 +75,10 @@ namespace asset {
const Duration len_; const Duration len_;
public: public:
typedef P<Media> PMedia; using PMedia = lib::P<Media>;
typedef P<proc::asset::Clip> PClip; using PClipAsset = lib::P<proc::asset::Clip>;
typedef P<proc::asset::ProcPatt> PProcPatt; using PProcPatt = lib::P<proc::asset::ProcPatt>;
typedef proc::mobject::session::PClipMO PClipMO; using PClip = mobject::Placement<mobject::session::Clip>;
static MediaFactory create; static MediaFactory create;
@ -103,7 +103,7 @@ namespace asset {
* it can be regenerated from the corresponding asset::Clip * it can be regenerated from the corresponding asset::Clip
* @return a Placement smart ptr owning the new Clip MObject * @return a Placement smart ptr owning the new Clip MObject
*/ */
PClipMO createClip (); PClip createClip ();
/** @return the overall length of the media represented by this asset */ /** @return the overall length of the media represented by this asset */
virtual Duration getLength () const; virtual Duration getLength () const;
@ -116,7 +116,7 @@ namespace asset {
/** get or create the correct asset::Clip /** get or create the correct asset::Clip
* corresponding to this media */ * corresponding to this media */
virtual PClip getClipAsset (); virtual PClipAsset getClipAsset ();
/** predicate to decide if this asset::Media /** predicate to decide if this asset::Media
* is part of a compound (multichannel) media. * is part of a compound (multichannel) media.
@ -144,7 +144,7 @@ namespace asset {
: boost::noncopyable : boost::noncopyable
{ {
public: public:
typedef P<Media> PType; typedef lib::P<Media> PType;
PType operator() (Asset::Ident& key, const string& file=""); PType operator() (Asset::Ident& key, const string& file="");
PType operator() (const string& file, const Category& cat); PType operator() (const string& file, const Category& cat);
@ -154,7 +154,7 @@ namespace asset {
PType operator() (const char* file, const Category& cat); PType operator() (const char* file, const Category& cat);
PType operator() (const char* file, asset::Kind); PType operator() (const char* file, asset::Kind);
P<Clip> lib::P<Clip>
operator() (Media& mediaref); operator() (Media& mediaref);
}; };

View file

@ -139,7 +139,7 @@ namespace asset {
inline ID<Meta>::ID(HashVal id) : ID<Asset> (id) {}; inline ID<Meta>::ID(HashVal id) : ID<Asset> (id) {};
inline ID<Meta>::ID(const Meta& meta) : ID<Asset> (meta.getID()) {}; inline ID<Meta>::ID(const Meta& meta) : ID<Asset> (meta.getID()) {};
typedef P<Meta> PMeta; typedef lib::P<Meta> PMeta;
@ -150,7 +150,7 @@ namespace asset {
: boost::noncopyable : boost::noncopyable
{ {
public: public:
typedef P<asset::Meta> PType; typedef lib::P<asset::Meta> PType;
template<class MA> template<class MA>
meta::Builder<MA> operator() (lib::idi::EntryID<MA> elementIdentity); meta::Builder<MA> operator() (lib::idi::EntryID<MA> elementIdentity);

View file

@ -135,7 +135,7 @@ namespace meta {
* Later on the intention is that in such cases, instead of creating a new grid * Later on the intention is that in such cases, instead of creating a new grid
* we'll silently return the already registered existing and equivalent grid. * we'll silently return the already registered existing and equivalent grid.
*/ */
P<TimeGrid> lib::P<TimeGrid>
Builder<TimeGrid>::commit() Builder<TimeGrid>::commit()
{ {
if (predecessor_) if (predecessor_)

View file

@ -113,7 +113,7 @@ namespace meta {
* the origin of this (local) grid. * the origin of this (local) grid.
* @todo currently not supported (as of 12/2010) * @todo currently not supported (as of 12/2010)
*/ */
P<TimeGrid> predecessor_; lib::P<TimeGrid> predecessor_;
/** /**
* initialise to blank (zero). * initialise to blank (zero).
@ -130,7 +130,7 @@ namespace meta {
/** create a time grid /** create a time grid
* based on settings within this builder * based on settings within this builder
*/ */
P<TimeGrid> commit(); lib::P<TimeGrid> commit();
}; };

View file

@ -40,7 +40,7 @@ namespace asset {
using std::string; using std::string;
class Pipe; class Pipe;
typedef P<Pipe> PPipe; typedef lib::P<Pipe> PPipe;
template<> template<>

View file

@ -50,7 +50,7 @@ namespace asset {
class Proc; class Proc;
class ProcFactory; class ProcFactory;
typedef P<const Proc> PProc; typedef lib::P<const Proc> PProc;
@ -121,7 +121,7 @@ namespace asset {
: boost::noncopyable : boost::noncopyable
{ {
public: public:
typedef P<asset::Proc> PType; typedef lib::P<asset::Proc> PType;
PType operator() (Asset::Ident& key); ////////////TODO define actual operation PType operator() (Asset::Ident& key); ////////////TODO define actual operation

View file

@ -65,7 +65,7 @@ namespace asset {
* some ProcPatt as a template for creating more * some ProcPatt as a template for creating more
* specialised patterns. * specialised patterns.
*/ */
P<ProcPatt> lib::P<ProcPatt>
ProcPatt::newCopy (string newID) const ProcPatt::newCopy (string newID) const
{ {
TODO ("implement the Pattern-ID within the propDescriptor!"); TODO ("implement the Pattern-ID within the propDescriptor!");

View file

@ -40,8 +40,8 @@ namespace asset {
class Proc; class Proc;
class ProcPatt; class ProcPatt;
class BuildInstruct; class BuildInstruct;
typedef P<const asset::Proc> PProc; typedef lib::P<const asset::Proc> PProc;
typedef P<const asset::ProcPatt> PProcPatt; typedef lib::P<const asset::ProcPatt> PProcPatt;
typedef vector<BuildInstruct> InstructionSequence; typedef vector<BuildInstruct> InstructionSequence;
@ -64,7 +64,7 @@ namespace asset {
friend class StructFactoryImpl; friend class StructFactoryImpl;
public: public:
P<ProcPatt> newCopy (string newID) const; lib::P<ProcPatt> newCopy (string newID) const;
ProcPatt& attach (Symbol where, PProc& node); ProcPatt& attach (Symbol where, PProc& node);
ProcPatt& operator+= (PProcPatt& toReuse); ProcPatt& operator+= (PProcPatt& toReuse);

View file

@ -78,7 +78,7 @@ namespace asset {
class Sequence; class Sequence;
typedef P<Sequence> PSequence; typedef lib::P<Sequence> PSequence;
@ -103,7 +103,6 @@ namespace asset {
}; };
typedef P<Sequence> PSequence;
///////////////////////////TODO currently just fleshing the API ///////////////////////////TODO currently just fleshing the API

View file

@ -76,7 +76,7 @@ namespace asset {
* asset is a code smell ////////////////////////////TICKET #691 * asset is a code smell ////////////////////////////TICKET #691
*/ */
template<class STRU> template<class STRU>
P<STRU> lib::P<STRU>
StructFactory::newInstance (Symbol nameID) StructFactory::newInstance (Symbol nameID)
{ {
Query<STRU> desired_name (isnil(nameID)? "" : "id("+nameID+")"); Query<STRU> desired_name (isnil(nameID)? "" : "id("+nameID+")");
@ -103,10 +103,10 @@ namespace asset {
* created as a side effect of calling the concrete Struct subclass ctor. * created as a side effect of calling the concrete Struct subclass ctor.
*/ */
template<class STRU> template<class STRU>
P<STRU> lib::P<STRU>
StructFactory::operator() (Query<STRU> const& capabilities) StructFactory::operator() (Query<STRU> const& capabilities)
{ {
P<STRU> res; lib::P<STRU> res;
QueryHandler<STRU>& typeHandler = ConfigResolver::instance(); QueryHandler<STRU>& typeHandler = ConfigResolver::instance();
typeHandler.resolve (res, capabilities); typeHandler.resolve (res, capabilities);
@ -131,7 +131,7 @@ namespace asset {
* re-invoking the ConfigRules.... * re-invoking the ConfigRules....
*/ */
template<class STRU> template<class STRU>
P<STRU> lib::P<STRU>
StructFactory::made4fake (Query<STRU> const& query) StructFactory::made4fake (Query<STRU> const& query)
{ {
STRU* pS = impl_->fabricate(query); STRU* pS = impl_->fabricate(query);
@ -149,7 +149,7 @@ namespace asset {
* @see ProcPatt * @see ProcPatt
* @see DefaultsManager * @see DefaultsManager
*/ */
P<Pipe> lib::P<Pipe>
StructFactory::newPipe (string pipeID, string streamID) StructFactory::newPipe (string pipeID, string streamID)
{ {
normaliseID (pipeID); normaliseID (pipeID);
@ -178,18 +178,19 @@ namespace asset {
namespace proc { namespace proc {
namespace asset { namespace asset {
using PPipe = lib::P<Pipe>;
template P<Pipe> StructFactory::operator() (Query<Pipe> const&); template PPipe StructFactory::operator() (Query<Pipe> const&);
template PProcPatt StructFactory::operator() (Query<const ProcPatt> const&); template PProcPatt StructFactory::operator() (Query<const ProcPatt> const&);
template PTimeline StructFactory::operator() (Query<Timeline> const&); template PTimeline StructFactory::operator() (Query<Timeline> const&);
template PSequence StructFactory::operator() (Query<Sequence>const&); template PSequence StructFactory::operator() (Query<Sequence>const&);
template P<Pipe> StructFactory::newInstance (Symbol); template PPipe StructFactory::newInstance (Symbol);
template PProcPatt StructFactory::newInstance (Symbol); template PProcPatt StructFactory::newInstance (Symbol);
template PTimeline StructFactory::newInstance (Symbol); template PTimeline StructFactory::newInstance (Symbol);
template PSequence StructFactory::newInstance (Symbol); template PSequence StructFactory::newInstance (Symbol);
template P<Pipe> StructFactory::made4fake (Query<Pipe> const&); template PPipe StructFactory::made4fake (Query<Pipe> const&);
template PProcPatt StructFactory::made4fake (Query<const ProcPatt> const&); template PProcPatt StructFactory::made4fake (Query<const ProcPatt> const&);
template PTimeline StructFactory::made4fake (Query<Timeline> const&); template PTimeline StructFactory::made4fake (Query<Timeline> const&);
template PSequence StructFactory::made4fake (Query<Sequence>const&); template PSequence StructFactory::made4fake (Query<Sequence>const&);

View file

@ -151,17 +151,17 @@ namespace asset {
public: public:
template<class STRU> template<class STRU>
P<STRU> operator() (Query<STRU> const& query); lib::P<STRU> operator() (Query<STRU> const& query);
// P<Timeline> operator() (MORef<Binding>); ///////////TODO doesn't this create circular includes?? Any better idea how to refer to an existing binding? // lib::P<Timeline> operator() (MORef<Binding>); ///////////TODO doesn't this create circular includes?? Any better idea how to refer to an existing binding?
template<class STRU> template<class STRU>
P<STRU> newInstance (Symbol nameID =""); lib::P<STRU> newInstance (Symbol nameID ="");
template<class STRU> template<class STRU>
P<STRU> made4fake (Query<STRU> const& query); ///< @warning to be removed in Alpha when using a real resolution engine /////TICKET #710 lib::P<STRU> made4fake (Query<STRU> const& query); ///< @warning to be removed in Alpha when using a real resolution engine /////TICKET #710
P<Pipe> newPipe (string pipeID, string streamID); lib::P<Pipe> newPipe (string pipeID, string streamID);
}; };

View file

@ -80,7 +80,7 @@ namespace asset {
class Timeline; class Timeline;
typedef P<Timeline> PTimeline; typedef lib::P<Timeline> PTimeline;
/** /**

View file

@ -75,7 +75,7 @@ namespace asset {
class Viewer; class Viewer;
typedef P<Viewer> PViewer; typedef lib::P<Viewer> PViewer;
/** /**

View file

@ -117,7 +117,7 @@ namespace asset {
DB::Lock guard(&registry); DB::Lock guard(&registry);
//////////////////////////////////////////////////////////TICKET #840 handle duplicate Registrations //////////////////////////////////////////////////////////TICKET #840 handle duplicate Registrations
P<KIND> smart_ptr (obj, &destroy); lib::P<KIND> smart_ptr (obj, &destroy);
registry.put (asset_id, smart_ptr); registry.put (asset_id, smart_ptr);
return asset_id; return asset_id;
@ -129,10 +129,10 @@ namespace asset {
* of the stored object differs and can't be casted. * of the stored object differs and can't be casted.
*/ */
template<class KIND> template<class KIND>
P<KIND> lib::P<KIND>
AssetManager::getAsset (const ID<KIND>& id) AssetManager::getAsset (const ID<KIND>& id)
{ {
if (P<KIND> obj = registry.get (id)) if (lib::P<KIND> obj = registry.get (id))
return obj; return obj;
else else
if (known (id)) // provide Ident tuple of existing Asset if (known (id)) // provide Ident tuple of existing Asset
@ -148,7 +148,7 @@ namespace asset {
* is explicitly given by type KIND. * is explicitly given by type KIND.
*/ */
template<class KIND> template<class KIND>
P<KIND> lib::P<KIND>
AssetManager::wrap (const KIND& asset) AssetManager::wrap (const KIND& asset)
{ {
ENSURE (instance().known(asset.id), ENSURE (instance().known(asset.id),
@ -250,6 +250,7 @@ namespace asset {
namespace proc { namespace proc {
namespace asset { namespace asset {
using lib::P;
template ID<Asset> AssetManager::reg (Asset* obj, const Asset::Ident& idi); template ID<Asset> AssetManager::reg (Asset* obj, const Asset::Ident& idi);

View file

@ -81,11 +81,11 @@ namespace asset {
/** retrieve the registered smart-ptr for any asset */ /** retrieve the registered smart-ptr for any asset */
template<class KIND> template<class KIND>
static P<KIND> wrap (const KIND& asset); static lib::P<KIND> wrap (const KIND& asset);
/** find and return corresponding object */ /** find and return corresponding object */
template<class KIND> template<class KIND>
P<KIND> getAsset (const ID<KIND>& id); lib::P<KIND> getAsset (const ID<KIND>& id);
/** @return true if the given id is registered in the internal asset DB */ /** @return true if the given id is registered in the internal asset DB */

View file

@ -71,7 +71,7 @@ namespace query {
using proc::asset::PSequence; using proc::asset::PSequence;
using proc::mobject::session::Fork; using proc::mobject::session::Fork;
using proc::mobject::session::PFork; using PFork = lib::P<Fork>;
template PPipe DefsManager::operator() (Query<Pipe> const&); template PPipe DefsManager::operator() (Query<Pipe> const&);
template PProcPatt DefsManager::operator() (Query<const ProcPatt> const&); template PProcPatt DefsManager::operator() (Query<const ProcPatt> const&);

View file

@ -52,7 +52,6 @@
namespace proc { namespace proc {
namespace control { namespace control {
// using lib::P;
// using std::string; // using std::string;
// using boost::format; // using boost::format;

View file

@ -68,7 +68,6 @@ namespace mobject {
namespace builder { namespace builder {
using lib::P;
/** /**
* Policy invoking an catch-all function for processing * Policy invoking an catch-all function for processing
@ -146,10 +145,10 @@ namespace mobject {
} }
template<class TAR> template<class TAR>
P<TAR> lib::P<TAR>
getPtr () getPtr ()
{ {
P<TAR>* pP = currentWrapper_.get<P<TAR>*>(); lib::P<TAR>* pP = currentWrapper_.get<lib::P<TAR>*>();
ENSURE (pP, "wrong target type when invoking %s", __PRETTY_FUNCTION__); ENSURE (pP, "wrong target type when invoking %s", __PRETTY_FUNCTION__);
return *pP; return *pP;
} }

View file

@ -46,7 +46,6 @@ namespace proc {
namespace mobject { namespace mobject {
using std::string; using std::string;
using lib::P;
//NOBUG_DECLARE_FLAG (mobjectmem); //NOBUG_DECLARE_FLAG (mobjectmem);

View file

@ -65,8 +65,8 @@
namespace proc { namespace proc {
namespace asset { namespace asset {
class Timeline; typedef P<Timeline> PTimeline; class Timeline; typedef lib::P<Timeline> PTimeline;
class Sequence; typedef P<Sequence> PSequence; class Sequence; typedef lib::P<Sequence> PSequence;
} }
namespace mobject { namespace mobject {

View file

@ -32,7 +32,7 @@ namespace proc {
namespace asset { namespace asset {
class Sequence; class Sequence;
typedef P<Sequence> PSequence; typedef lib::P<Sequence> PSequence;
} }

View file

@ -32,7 +32,7 @@ namespace proc {
namespace asset { namespace asset {
class Pipe; class Pipe;
typedef P<Pipe> PPipe; typedef lib::P<Pipe> PPipe;
} }

View file

@ -26,6 +26,7 @@
#include "proc/mobject/session/abstractmo.hpp" #include "proc/mobject/session/abstractmo.hpp"
#include "lib/time/timevalue.hpp" #include "lib/time/timevalue.hpp"
#include "lib/p.hpp"
namespace proc { namespace proc {
@ -40,8 +41,12 @@ namespace session {
using asset::Media; using asset::Media;
using lib::time::TimeVar; using lib::time::TimeVar;
typedef P<Media> PMedia; class Clip;
typedef P<asset::Clip> PClipAsset;
using PMedia = lib::P<Media>;
using PClipAsset = lib::P<asset::Clip>;
using PClip = Placement<Clip>;
/** /**
@ -103,7 +108,6 @@ namespace session {
}; };
typedef Placement<Clip> PClipMO;

View file

@ -40,8 +40,8 @@ namespace session {
using asset::Media; using asset::Media;
using lib::time::TimeVar; using lib::time::TimeVar;
typedef P<Media> PMedia; typedef lib::P<Media> PMedia;
typedef P<asset::Clip> PClipAsset; typedef lib::P<asset::Clip> PClipAsset;
/** /**

View file

@ -42,7 +42,7 @@ namespace asset {
class Effect; class Effect;
class Sequence; class Sequence;
typedef P<Sequence> PSequence; typedef lib::P<Sequence> PSequence;
} }

View file

@ -76,7 +76,7 @@ namespace asset {
template<class CHI, class PAR> template<class CHI, class PAR>
inline bool inline bool
dependencyCheck (P<CHI> child, P<PAR> parent) dependencyCheck (lib::P<CHI> child, lib::P<PAR> parent)
{ {
return (child == parent) return (child == parent)
|| (0 < child->getParents().size() || (0 < child->getParents().size()

View file

@ -153,8 +153,8 @@ namespace test {
void dependProcPatt(string pID) void dependProcPatt(string pID)
{ {
typedef P<Pipe> PPipe; /////TODO: transition to P<> typedef lib::P<Pipe> PPipe; /////TODO: transition to P<>
typedef P<const ProcPatt> PProcPatt; typedef lib::P<const ProcPatt> PProcPatt;
PPipe thePipe = Pipe::query ("pipe("+pID+")"); PPipe thePipe = Pipe::query ("pipe("+pID+")");
CHECK (thePipe); CHECK (thePipe);

View file

@ -65,7 +65,7 @@ namespace test {
////////////////////////////////////TICKET #589 ////////////////////////////////////TICKET #589
typedef P<Media> PM; /////TODO: transition to P<> typedef lib::P<Media> PM; /////TODO: transition to P<>
/** @test Creating and automatically registering Asset instances. /** @test Creating and automatically registering Asset instances.
* Re-Retrieving the newly created objects from AssetManager. * Re-Retrieving the newly created objects from AssetManager.

View file

@ -198,8 +198,8 @@ namespace test {
Depend4Test<backend::test::MediaAccessMock> within_this_scope; Depend4Test<backend::test::MediaAccessMock> within_this_scope;
// -----Media and Clip-------------------------------- // -----Media and Clip--------------------------------
typedef P<Media> PM; typedef lib::P<Media> PM;
typedef P<Clip> PC; typedef lib::P<Clip> PC;
PM mm = asset::Media::create("test-1", VIDEO); PM mm = asset::Media::create("test-1", VIDEO);
PC cc = mm->createClip()->findClipAsset(); PC cc = mm->createClip()->findClipAsset();
CHECK (dependencyCheck (cc,mm)); CHECK (dependencyCheck (cc,mm));

View file

@ -54,8 +54,8 @@ namespace test {
*/ */
class MakeClip_test : public Test class MakeClip_test : public Test
{ {
typedef P<asset::Media> PM; typedef lib::P<asset::Media> PM;
typedef asset::Media::PClipMO PC; typedef asset::Media::PClip PC;
virtual void run (Arg) virtual void run (Arg)
{ {

View file

@ -79,7 +79,7 @@ namespace test {
* within AssetManager by the Asset base class ctor * within AssetManager by the Asset base class ctor
*/ */
template<class A> template<class A>
P<TestAsset<A> > lib::P<TestAsset<A> >
TestAsset<A>::ptrFromThis () TestAsset<A>::ptrFromThis ()
{ {
return static_pointer_cast<TestAsset<A>,Asset> return static_pointer_cast<TestAsset<A>,Asset>
@ -111,8 +111,8 @@ namespace test {
template TestAsset<Asset>::TestAsset (PAsset& pRef); template TestAsset<Asset>::TestAsset (PAsset& pRef);
template TestAsset<Unknown>::TestAsset (PAsset& pRef); template TestAsset<Unknown>::TestAsset (PAsset& pRef);
template P<TestAsset<Asset> > TestAsset<Asset>::ptrFromThis (); template lib::P<TestAsset<Asset> > TestAsset<Asset>::ptrFromThis ();
template P<TestAsset<Unknown> > TestAsset<Unknown>::ptrFromThis (); template lib::P<TestAsset<Unknown> > TestAsset<Unknown>::ptrFromThis ();

View file

@ -53,7 +53,7 @@ namespace test {
static void deleter (TestAsset<A>* aa) { delete aa; } static void deleter (TestAsset<A>* aa) { delete aa; }
public: public:
typedef P<TestAsset<A> > PA; typedef lib::P<TestAsset<A> > PA;
static PA create () { return (new TestAsset<A> )->ptrFromThis(); } static PA create () { return (new TestAsset<A> )->ptrFromThis(); }
static PA create (PAsset& pRef) { return (new TestAsset<A> (pRef))->ptrFromThis(); } static PA create (PAsset& pRef) { return (new TestAsset<A> (pRef))->ptrFromThis(); }