Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
PlacementRef< MX > Class Template Reference

#include "steam/mobject/placement-ref.hpp"

Description

template<class MX = MObject>
class steam::mobject::PlacementRef< MX >

Reference tag denoting a placement attached to the session.

Implemented as a smart-handle, transparently accessing the PlacementIndex to resolve the embedded hash-ID into a language reference to the referred placement.

See also
MObectRef
placement-index.hpp

Definition at line 90 of file placement-ref.hpp.

Public Member Functions

template<class Y >
 PlacementRef (Y const &refID)
 Creating a PlacementRef from a compatible reference source.
 
 PlacementRef ()
 Default is an NIL Placement ref.
 
 PlacementRef (PlacementRef const &r)
 
template<class X >
 PlacementRef (PlacementRef< X > const &r)
 
PlacementRefoperator= (PlacementRef const &r)
 
template<class X >
PlacementRefoperator= (PlacementRef< X > const &r)
 
template<class Y >
PlacementRefoperator= (Y const &refID)
 
void clear ()
 
PlacementMXoperator* () const
 dereferencing fetches referred Placement from Index
 
PlacementMXoperator-> () const
 provide access to pointee API by smart-ptr chaining
 
 operator string () const
 
size_t use_count () const
 
 operator _Id const & () const
 
LumieraUid getLUID () const
 
template<class O >
bool operator== (PlacementRef< O > const &o) const
 
template<class O >
bool operator!= (PlacementRef< O > const &o) const
 
 operator bool () const
 
bool isValid () const
 
ExplicitPlacement resolve () const
 

Private Types

typedef Placement< MX > PlacementMX
 
typedef Placement< MObject >::ID _ID
 
typedef Placement< MObject >::Id< MX > _Id
 

Private Member Functions

bool checkValidity () const
 

Static Private Member Functions

static void validate (_Id const &rId)
 
static _Id const & recast (_ID const &someID)
 
static _Id const & recast (const LumieraUid luid)
 
static _Id const & bottomID ()
 
static PlacementMXaccess (_Id const &placementID)
 

Private Attributes

_Id id_
 

Constructor & Destructor Documentation

◆ PlacementRef() [1/4]

template<class MX = MObject>
template<class Y >
PlacementRef ( Y const &  refID)
inlineexplicit

Creating a PlacementRef from a compatible reference source.

Any source allowing to infer a compatible mobject::Placement is accepted. Here, compatibility is decided based on the run time type of the pointee, in comparison to the template parameter Y. In any case, for this ctor to succeed, the provided ref or ID needs to be resolvable to a placement by the implicit PlacementIndex facility used by all PlacementRef instances (typically the Session).

Note
there is no default ctor, a reference source is mandatory.
Parameters
refIDreference resolvable to a placement via Index, especially
  • an existing Placement
  • just an Placement::ID
  • a plain LUID
Exceptions
error::Invalidon incompatible run time type of the resolved ID

Definition at line 116 of file placement-ref.hpp.

References PlacementRef< MX >::id_, and PlacementRef< MX >::validate().

+ Here is the call graph for this function:

◆ PlacementRef() [2/4]

template<class MX = MObject>
PlacementRef ( )
inline

Default is an NIL Placement ref.

It throws on any access.

Definition at line 123 of file placement-ref.hpp.

References PlacementRef< MX >::isValid().

+ Here is the call graph for this function:

◆ PlacementRef() [3/4]

template<class MX = MObject>
PlacementRef ( PlacementRef< MX > const &  r)
inline
Parameters
rcopy ctor

Definition at line 129 of file placement-ref.hpp.

References PlacementRef< MX >::id_, and PlacementRef< MX >::validate().

+ Here is the call graph for this function:

◆ PlacementRef() [4/4]

template<class MX = MObject>
template<class X >
PlacementRef ( PlacementRef< X > const &  r)
inline
Parameters
rextended copy ctor, when type X is assignable to MX

Definition at line 136 of file placement-ref.hpp.

References PlacementRef< MX >::id_, and PlacementRef< MX >::validate().

+ Here is the call graph for this function:

Member Typedef Documentation

◆ PlacementMX

template<class MX = MObject>
typedef Placement<MX> PlacementMX
private

Definition at line 92 of file placement-ref.hpp.

◆ _ID

template<class MX = MObject>
typedef Placement<MObject>::ID _ID
private

Definition at line 93 of file placement-ref.hpp.

◆ _Id

template<class MX = MObject>
typedef Placement<MObject>::Id<MX> _Id
private

Definition at line 94 of file placement-ref.hpp.

Member Function Documentation

◆ operator=() [1/3]

template<class MX = MObject>
PlacementRef & operator= ( PlacementRef< MX > const &  r)
inline

Definition at line 144 of file placement-ref.hpp.

References PlacementRef< MX >::id_, and PlacementRef< MX >::validate().

+ Here is the call graph for this function:

◆ operator=() [2/3]

template<class MX = MObject>
template<class X >
PlacementRef & operator= ( PlacementRef< X > const &  r)
inline

Definition at line 153 of file placement-ref.hpp.

References PlacementRef< MX >::id_, PlacementRef< MX >::recast(), and PlacementRef< MX >::validate().

+ Here is the call graph for this function:

◆ operator=() [3/3]

template<class MX = MObject>
template<class Y >
PlacementRef & operator= ( Y const &  refID)
inline

Definition at line 162 of file placement-ref.hpp.

References PlacementRef< MX >::id_, PlacementRef< MX >::recast(), and PlacementRef< MX >::validate().

+ Here is the call graph for this function:

◆ clear()

template<class MX = MObject>
void clear ( )
inline

Definition at line 169 of file placement-ref.hpp.

References PlacementRef< MX >::bottomID(), and PlacementRef< MX >::id_.

+ Here is the call graph for this function:

◆ operator*()

template<class MX = MObject>
PlacementMX & operator* ( ) const
inline

dereferencing fetches referred Placement from Index

Definition at line 175 of file placement-ref.hpp.

References PlacementRef< MX >::access(), and PlacementRef< MX >::id_.

+ Here is the call graph for this function:

◆ operator->()

template<class MX = MObject>
PlacementMX & operator-> ( ) const
inline

provide access to pointee API by smart-ptr chaining

Definition at line 177 of file placement-ref.hpp.

References PlacementRef< MX >::access(), and PlacementRef< MX >::id_.

+ Here is the call graph for this function:

◆ operator string()

template<class MX = MObject>
operator string ( ) const
inline

Definition at line 179 of file placement-ref.hpp.

References PlacementRef< MX >::access(), and PlacementRef< MX >::id_.

+ Here is the call graph for this function:

◆ use_count()

template<class MX = MObject>
size_t use_count ( ) const
inline

Definition at line 180 of file placement-ref.hpp.

References PlacementRef< MX >::access(), and PlacementRef< MX >::id_.

Referenced by PlacementRef_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator _Id const &()

template<class MX = MObject>
operator _Id const & ( ) const
inline

Definition at line 184 of file placement-ref.hpp.

References PlacementRef< MX >::id_.

◆ getLUID()

template<class MX = MObject>
LumieraUid getLUID ( ) const
inline

Definition at line 185 of file placement-ref.hpp.

References PlacementRef< MX >::id_.

◆ operator==()

template<class MX = MObject>
template<class O >
bool operator== ( PlacementRef< O > const &  o) const
inline

Definition at line 188 of file placement-ref.hpp.

References PlacementRef< MX >::id_.

◆ operator!=()

template<class MX = MObject>
template<class O >
bool operator!= ( PlacementRef< O > const &  o) const
inline

Definition at line 190 of file placement-ref.hpp.

References PlacementRef< MX >::id_.

◆ operator bool()

template<class MX = MObject>
operator bool ( ) const
inlineexplicit

Definition at line 199 of file placement-ref.hpp.

References PlacementRef< MX >::isValid().

+ Here is the call graph for this function:

◆ isValid()

template<class MX = MObject>
bool isValid ( ) const
inline

Definition at line 204 of file placement-ref.hpp.

References PlacementRef< MX >::access(), PlacementRef< MX >::checkValidity(), and PlacementRef< MX >::id_.

Referenced by PlacementRef< MX >::PlacementRef(), Scope::Scope(), Scope::Scope(), Scope::isValid(), and PlacementRef< MX >::operator bool().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolve()

template<class MX = MObject>
ExplicitPlacement resolve ( ) const
inline

Definition at line 217 of file placement-ref.hpp.

References PlacementRef< MX >::access(), PlacementRef< MX >::id_, and ExplicitPlacement::resolve().

Referenced by PlacementRef_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkValidity()

template<class MX = MObject>
bool checkValidity ( ) const
inlineprivate

Definition at line 227 of file placement-ref.hpp.

References SessionServiceFetch::isAccessible(), and SessionServiceFetch::isRegisteredID().

Referenced by PlacementRef< MX >::isValid().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate()

template<class MX = MObject>
static void validate ( _Id const &  rId)
inlinestaticprivate

Definition at line 234 of file placement-ref.hpp.

References PlacementRef< MX >::access().

Referenced by PlacementRef< MX >::PlacementRef(), PlacementRef< MX >::PlacementRef(), PlacementRef< MX >::PlacementRef(), PlacementRef< MX >::operator=(), PlacementRef< MX >::operator=(), and PlacementRef< MX >::operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recast() [1/2]

template<class MX = MObject>
static _Id const & recast ( _ID const &  someID)
inlinestaticprivate

Definition at line 241 of file placement-ref.hpp.

Referenced by PlacementRef< MX >::bottomID(), PlacementRef< MX >::operator=(), and PlacementRef< MX >::operator=().

+ Here is the caller graph for this function:

◆ recast() [2/2]

template<class MX = MObject>
static _Id const & recast ( const LumieraUid  luid)
inlinestaticprivate

Definition at line 247 of file placement-ref.hpp.

◆ bottomID()

template<class MX = MObject>
static _Id const & bottomID ( )
inlinestaticprivate

Definition at line 254 of file placement-ref.hpp.

References PlacementRef< MX >::recast().

Referenced by PlacementRef< MX >::clear().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ access()

template<class MX = MObject>
static PlacementMX & access ( _Id const &  placementID)
inlinestaticprivate

Definition at line 261 of file placement-ref.hpp.

References LERR_, and SessionServiceFetch::resolveID().

Referenced by PlacementRef< MX >::isValid(), PlacementRef< MX >::operator string(), PlacementRef< MX >::operator*(), PlacementRef< MX >::operator->(), PlacementRef< MX >::resolve(), PlacementRef< MX >::use_count(), and PlacementRef< MX >::validate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ id_

+ Inheritance diagram for PlacementRef< MX >:
+ Collaboration diagram for PlacementRef< MX >:

The documentation for this class was generated from the following files: