![]() |
Lumiera 0.pre.04
»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 85 of file mobject-ref.hpp.
Public Member Functions | |
| MO * | operator-> () const |
| Placement< MO > & | getPlacement () const |
| PlacementRef< MO > const & | getRef () const |
| allow to use a MObjectRef like a (bare) PlacementRef | |
| operator _Id const & () const | |
| allow to use MObjectRef instead of a Placement-ID (hash) | |
| lib::time::Time | getStartTime () |
| resolves the referred placement to an ExplicitPlacement and returns the found start time | |
| template<class MOX > | |
| MORef< MOX > | attach (Placement< MOX > const &newPlacement) |
| attach a child element to the model | |
| void | purge () |
| detach this object instance from model, including all child elements. | |
| MORef & | activate (Placement< MO > const &placement) |
| activate an MObject reference, based on an existing placement, which needs to be contained (added to) the session. | |
| 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> : | |
| MORef & | activate (MORef const &oRef) |
| build and activate an MObject reference based on an existing reference of the same pointee type | |
| template<typename MOX > | |
| MORef & | activate (MORef< MOX > const &oRef) |
| template<typename MOX > | |
| MORef & | operator= (MORef< MOX > const &oRef) |
| cross assignment. | |
| bool | isValid () const |
| size_t | use_count () const |
| template<class MOX > | |
| bool | isCompatible () const |
| operator string () const | |
| template<class MOX > | |
| bool | operator== (MORef< MOX > const &oRef) const |
| template<class MOX > | |
| bool | operator!= (MORef< MOX > const &oRef) const |
| bool | operator== (PlacementMO::ID const &pID) const |
| bool | operator!= (PlacementMO::ID const &pID) const |
Public Member Functions inherited from Handle< IMP > | |
| Handle ()=default | |
| by default create an Null handle. | |
| Handle (IMP *imp) | |
| directly establish handle from an implementation, which typically way just heap allocated beforehand. | |
| Handle (Handle const &r)=default | |
| Handle (Handle &&rr)=default | |
| template<class Y > | |
| Handle (shared_ptr< Y > const &r) | |
| template<class Y > | |
| Handle (shared_ptr< Y > &&srr) | |
| template<class Y > | |
| Handle (weak_ptr< Y > const &wr) | |
| template<class Y > | |
| Handle (unique_ptr< Y > &&urr) | |
| Handle & | operator= (Handle const &r)=default |
| Handle & | operator= (Handle &&rr)=default |
| template<class Y > | |
| Handle & | operator= (shared_ptr< Y > const &sr) |
| template<class Y > | |
| Handle & | operator= (shared_ptr< Y > &&srr) |
| template<class Y > | |
| Handle & | operator= (unique_ptr< Y > &&urr) |
| operator bool () const | |
| bool | isValid () const |
| template<typename DEL > | |
| Handle & | activate (IMP *impl, DEL whenDead) |
| Activation of the handle by the managing service. | |
| Handle & | activate (shared_ptr< IMP > const &impl) |
| another way of activating a handle by sharing ownership with an existing smart-ptr | |
| Handle & | activate (shared_ptr< IMP > &&impl) |
| void | close () |
| deactivate this handle, so it isn't tied any longer to the associated implementation or service object. | |
Friends | |
| template<class MOX > | |
| bool | operator== (MORef const &oRef, PlacementRef< MOX > const &pRef) |
| 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!= (PlacementRef< MOX > const &pRef, MORef const &oRef) |
Private Types | |
| typedef lib::Handle< MO > | _Handle |
| typedef PlacementMO::Id< MO > | _Id |
Private Attributes | |
| PlacementRef< MO > | pRef_ |
| SmPtr | smPtr_ |
Additional Inherited Members | |
Protected Types inherited from Handle< IMP > | |
| typedef std::shared_ptr< IMP > | SmPtr |
Protected Member Functions inherited from Handle< IMP > | |
| IMP & | impl () const |
Protected Attributes inherited from Handle< IMP > | |
| SmPtr | smPtr_ |
|
private |
Definition at line 88 of file mobject-ref.hpp.
|
private |
Definition at line 89 of file mobject-ref.hpp.
|
inline |
Definition at line 100 of file mobject-ref.hpp.
References INSTANCEOF, LERR_, and MORef< MO >::smPtr_.
|
inline |
Definition at line 111 of file mobject-ref.hpp.
References INSTANCEOF, MORef< MO >::isValid(), LERR_, MORef< MO >::pRef_, and MORef< MO >::smPtr_.
Referenced by MORef< MO >::activate(), MORef< MO >::activate(), MObjectRef_test::checkBuildMObjectRef(), MObjectRef_test::checkLifecycle(), MObjectRef_test::checkTypeHandling(), steam::mobject::isEquivalentPlacement(), steam::mobject::isSharedPointee(), MORef< MO >::operator string(), PlacementObjectIdentity_test::run(), and SessionElementQuery_test::run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
allow to use a MObjectRef like a (bare) PlacementRef
Definition at line 125 of file mobject-ref.hpp.
References MORef< MO >::pRef_.
Referenced by SessionElementQuery_test::run().
Here is the caller graph for this function:
|
inline |
allow to use MObjectRef instead of a Placement-ID (hash)
Definition at line 134 of file mobject-ref.hpp.
References MORef< MO >::pRef_.
|
inline |
resolves the referred placement to an ExplicitPlacement and returns the found start time
Definition at line 145 of file mobject-ref.hpp.
References MORef< MO >::pRef_.
Referenced by MObjectRef_test::checkBuildMObjectRef().
Here is the caller graph for this function:
|
inline |
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 158 of file mobject-ref.hpp.
References MORef< MO >::activate(), SessionServiceMutate::attach_toModel(), MORef< MO >::isValid(), LERR_, and MORef< MO >::pRef_.
Here is the call graph for this function:
|
inline |
detach this object instance from model, including all child elements.
Definition at line 175 of file mobject-ref.hpp.
References SessionServiceMutate::detach_and_clear(), MORef< MO >::isValid(), and MORef< MO >::pRef_.
Referenced by Timeline::unlink().
Here is the call graph for this function:
Here is the caller graph for this function: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 195 of file mobject-ref.hpp.
References MORef< MO >::pRef_, and MORef< MO >::smPtr_.
Referenced by MORef< MO >::activate(), MORef< MO >::activate(), MORef< MO >::activate(), MORef< MO >::attach(), MObjectRef_test::checkBuildMObjectRef(), MObjectRef_test::checkComparison(), MObjectRef_test::checkLifecycle(), MObjectRef_test::checkTypeHandling(), MORef< MO >::operator=(), and PlacementObjectIdentity_test::run().
Here is the caller graph for this function: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 215 of file mobject-ref.hpp.
References MORef< MO >::activate(), MORef< MO >::isValid(), and MORef< MO >::pRef_.
Here is the call graph for this function: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 232 of file mobject-ref.hpp.
References MORef< MO >::activate(), and MORef< MO >::getPlacement().
Here is the call graph for this function:
|
inline |
Definition at line 239 of file mobject-ref.hpp.
References MORef< MO >::activate(), and MORef< MO >::getPlacement().
Here is the call graph for this function:
|
inline |
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 253 of file mobject-ref.hpp.
References MORef< MO >::activate().
Here is the call graph for this function:
|
inline |
Definition at line 263 of file mobject-ref.hpp.
References Handle< IMP >::isValid(), and MORef< MO >::pRef_.
Referenced by MORef< MO >::activate(), MORef< MO >::attach(), MObjectRef_test::checkBuildMObjectRef(), MObjectRef_test::checkTypeHandling(), MORef< MO >::getPlacement(), steam::mobject::isEquivalentPlacement(), steam::mobject::isSharedPointee(), MORef< MO >::operator string(), MORef< MO >::operator!=(), MORef< MO >::operator!=(), MORef< MO >::operator==(), MORef< MO >::operator==(), MORef< MO >::purge(), SessionElementQuery_test::run(), and MORef< MO >::use_count().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 270 of file mobject-ref.hpp.
References MORef< MO >::isValid(), and MORef< MO >::pRef_.
Referenced by MObjectRef_test::checkBuildMObjectRef(), MObjectRef_test::checkLifecycle(), MObjectRef_test::checkTypeHandling(), and PlacementObjectIdentity_test::run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 277 of file mobject-ref.hpp.
References MORef< MO >::pRef_.
Referenced by MObjectRef_test::checkBuildMObjectRef().
Here is the caller graph for this function:
|
inline |
Definition at line 283 of file mobject-ref.hpp.
References MORef< MO >::getPlacement(), and MORef< MO >::isValid().
Here is the call graph for this function:
|
inline |
Definition at line 296 of file mobject-ref.hpp.
References MORef< MO >::isValid(), and MORef< MO >::pRef_.
Here is the call graph for this function:
|
inline |
Definition at line 304 of file mobject-ref.hpp.
References MORef< MO >::isValid(), and MORef< MO >::pRef_.
Here is the call graph for this function:
|
inline |
Definition at line 343 of file mobject-ref.hpp.
References MORef< MO >::isValid(), and MORef< MO >::pRef_.
Here is the call graph for this function:
|
inline |
Definition at line 350 of file mobject-ref.hpp.
References MORef< MO >::isValid(), and MORef< MO >::pRef_.
Here is the call graph for this function:
|
private |
Definition at line 92 of file mobject-ref.hpp.
Referenced by MORef< MO >::activate(), MORef< MO >::activate(), MORef< MO >::attach(), MORef< MO >::getPlacement(), MORef< MO >::getRef(), MORef< MO >::getStartTime(), MORef< MO >::isCompatible(), MORef< MO >::isValid(), MORef< MO >::operator _Id const &(), MORef< MO >::operator!=(), MORef< MO >::operator!=(), MORef< MO >::operator==(), MORef< MO >::operator==(), MORef< MO >::purge(), and MORef< MO >::use_count().
|
private |
Definition at line 68 of file handle.hpp.
Referenced by MORef< MO >::activate(), MORef< MO >::getPlacement(), and MORef< MO >::operator->().
|
friend |
Definition at line 312 of file mobject-ref.hpp.
|
friend |
Definition at line 320 of file mobject-ref.hpp.
|
friend |
Definition at line 328 of file mobject-ref.hpp.
|
friend |
Definition at line 336 of file mobject-ref.hpp.
Inheritance diagram for MORef< MO >:
Collaboration diagram for MORef< MO >: