61#ifndef MOBJECT_PLACEMENT_H
62#define MOBJECT_PLACEMENT_H
77 namespace session{
class MObjectFactory; }
80 class ExplicitPlacement;
82 using std::shared_ptr;
83 using std::static_pointer_cast;
105 template<
class MO,
class B =MObject>
115 :
protected shared_ptr<MObject>
116 ,
public HashIndexed<Placement<MObject>, lib::hash::LuidH >
123 using Pipe = asset::shared_ptr<asset::Pipe>;
136 return _SmartPtr::operator->();
146 return 0 !=
dynamic_cast<Y*
> (get());
156 REQUIRE (isCompatible<Y>());
157 target = static_pointer_cast<Y>(*
this);
164 return static_cast<const void*
> (p1.get())
165 ==
static_cast<const void*
> (p2.get());
169 operator string()
const ;
170 size_t use_count()
const {
return _SmartPtr::use_count(); }
171 bool isValid()
const {
return _SmartPtr::use_count(); }
230 template<
class MO,
class B>
236 using _Id = _Parent::template Id<MO>
const&;
251 return static_cast<MO*
>
252 (_SmartPtr::operator-> ());
258 return _Parent::template recastID<MO>();
Hash implementation based on a lumiera unique object id (LUID) When invoking the default ctor,...
Lumiera's internal time value datatype.
Special kind of Placement, where the location of the MObject has been nailed down to a fixed position...
MObject is the interface class for all "Media Objects".
friend bool isSharedPointee(Placement const &p1, Placement const &p2)
free function to detect two placements sharing a pointee
virtual ExplicitPlacement resolve() const
combine and resolve all constraints defined by the various LocatingPin (
session::LocatingPin chain
interface for defining the kind of placement to employ, and for controlling any additional constraint...
MObject * operator->() const
smart pointer: accessing the MObject, which is subject to placement.
shared_ptr< MObject > _SmartPtr
Placement(Placement const &ref)
HashIndexed< Placement< MObject >, lib::hash::LuidH > HashInd
bool isCompatible() const
run time diagnostics: is the pointee of this placement compatible to the given type?
void extendOwnershipTo(shared_ptr< Y > &target) const
extend shared ownership to the given smart-ptr
Placement(MObject &subject, Deleter killer)
asset::shared_ptr< asset::Pipe > Pipe
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
_Parent::_SmartPtr _SmartPtr
_Parent::template Id< MO > const & _Id
Placement(MO &mo, Deleter killer)
Positioning specification, possibly chained to further specifications.
Lumiera error handling (C++ interface).
A template for generating hash based ID tags carrying compile-time type info.
Implementing the Placement mechanics.
Namespace of Session and user visible high-level objects.
string format_PlacementID(Placement< MObject > const &pla)
bool isSameDef(PlacementMO const &pl1, PlacementMO const &pl2)
compare the properties of placement
Steam-Layer implementation namespace root.
A "processing pipe" represented as Asset.
A Mixin to add a private ID type to the target class, together with storage to hold an instance of th...
a family of time value like entities and their relationships.
#define INSTANCEOF(CLASS, EXPR)
shortcut for subclass test, intended for assertions only.