Lumiera
0.pre.03
»edit your freedom«
|
#include "steam/mobject/mobject-ref.hpp"
An active (smart-ptr like) external reference to a specifically placed MObject "instance" within the session.
Implemented as a smart-ptr sharing ownership of the pointee MObject with the corresponding placement within the session. Additionally, a PlacementRef is incorporated, allowing to re-access this placement with the help of PlacementIndex within the current session.
Definition at line 94 of file mobject-ref.hpp.
Public Member Functions | |
MORef & | activate (Placement< MO > const &placement) |
activate an MObject reference, based on an existing placement, which needs to be contained (added to) the session. More... | |
template<typename REF > | |
MORef & | activate (REF const &pRefID) |
build and activate an MObject reference, based on anything which might be assigned to an PlarementRef<MO> : More... | |
MORef & | activate (MORef const &oRef) |
build and activate an MObject reference based on an existing reference of the same pointee type More... | |
template<typename MOX > | |
MORef & | activate (MORef< MOX > const &oRef) |
template<class MOX > | |
MORef< MOX > | attach (Placement< MOX > const &newPlacement) |
attach a child element to the model More... | |
Placement< MO > & | getPlacement () const |
PlacementRef< MO > const & | getRef () const |
allow to use a MObjectRef like a (bare) PlacementRef More... | |
lib::time::Time | getStartTime () |
resolves the referred placement to an ExplicitPlacement and returns the found start time | |
template<class MOX > | |
bool | isCompatible () const |
bool | isValid () const |
operator _Id const & () const | |
allow to use MObjectRef instead of a Placement-ID (hash) More... | |
operator string () const | |
template<class MOX > | |
bool | operator!= (MORef< MOX > const &oRef) const |
bool | operator!= (PlacementMO::ID const &pID) const |
MO * | operator-> () const |
template<typename MOX > | |
MORef & | operator= (MORef< MOX > const &oRef) |
cross assignment. More... | |
template<class MOX > | |
bool | operator== (MORef< MOX > const &oRef) const |
bool | operator== (PlacementMO::ID const &pID) const |
void | purge () |
detach this object instance from model, including all child elements. More... | |
size_t | use_count () const |
Public Member Functions inherited from Handle< MO > | |
Handle ()=default | |
by default create an Null handle. More... | |
Handle (MO *imp) | |
directly establish handle from an implementation, which typically way just heap allocated beforehand. | |
Handle (Handle const &r)=default | |
Handle (Handle &&rr)=default | |
Handle (shared_ptr< Y > const &r) | |
Handle (shared_ptr< Y > &&srr) | |
Handle (weak_ptr< Y > const &wr) | |
Handle (unique_ptr< Y > &&urr) | |
Handle & | activate (MO *impl, DEL whenDead) |
Activation of the handle by the managing service. More... | |
Handle & | activate (shared_ptr< MO > const &impl) |
another way of activating a handle by sharing ownership with an existing smart-ptr | |
Handle & | activate (shared_ptr< MO > &&impl) |
void | close () |
deactivate this handle, so it isn't tied any longer to the associated implementation or service object. More... | |
bool | isValid () const |
operator bool () const | |
Handle & | operator= (Handle const &r)=default |
Handle & | operator= (Handle &&rr)=default |
Handle & | operator= (shared_ptr< Y > const &sr) |
Handle & | operator= (shared_ptr< Y > &&srr) |
Handle & | operator= (unique_ptr< Y > &&urr) |
Friends | |
template<class MOX > | |
bool | operator!= (MORef const &oRef, PlacementRef< MOX > const &pRef) |
template<class MOX > | |
bool | operator!= (PlacementRef< MOX > const &pRef, MORef const &oRef) |
template<class MOX > | |
bool | operator== (MORef const &oRef, PlacementRef< MOX > const &pRef) |
template<class MOX > | |
bool | operator== (PlacementRef< MOX > const &pRef, MORef const &oRef) |
Private Types | |
typedef lib::Handle< MO > | _Handle |
typedef PlacementMO::Id< MO > | _Id |
Private Attributes | |
PlacementRef< MO > | pRef_ |
Additional Inherited Members | |
Protected Types inherited from Handle< MO > | |
typedef std::shared_ptr< MO > | SmPtr |
Protected Member Functions inherited from Handle< MO > | |
MO & | impl () const |
Protected Attributes inherited from Handle< MO > | |
SmPtr | smPtr_ |
|
inline |
allow to use a MObjectRef like a (bare) PlacementRef
Definition at line 134 of file mobject-ref.hpp.
|
inline |
allow to use MObjectRef instead of a Placement-ID (hash)
Definition at line 143 of file mobject-ref.hpp.
attach a child element to the model
newPlacement | to be copied into the model, placed into the scope of the object denoted by this MORef |
Definition at line 167 of file mobject-ref.hpp.
|
inline |
detach this object instance from model, including all child elements.
Definition at line 184 of file mobject-ref.hpp.
References SessionServiceMutate::detach_and_clear().
Referenced by Timeline::unlink().
activate an MObject reference, based on an existing placement, which needs to be contained (added to) the session.
After checking the validity of the placement, this MObjectRef shares ownership of the referred MObject with the denoted placement.
Definition at line 204 of file mobject-ref.hpp.
Referenced by SessionImpl::attach().
|
inline |
build and activate an MObject reference, based on anything which might be assigned to an PlarementRef<MO> :
error::Invalid | when the (directly or indirectly referred placement isn't known to the session PlacementIndex, or when the placement actually found has an incompatible dynamic type |
Definition at line 224 of file mobject-ref.hpp.
build and activate an MObject reference based on an existing reference of the same pointee type
error::Invalid | when the referred placement isn't known to the current session's PlacementIndex |
Definition at line 241 of file mobject-ref.hpp.
cross assignment.
error::Invalid | when the referred placement isn't registered within the current session, or if the runtime type of the pointees aren't assignment compatible |
Definition at line 262 of file mobject-ref.hpp.