Lumiera  0.pre.03
»edit your freedom«
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 57 of file output-designation.hpp.

Public Member Functions

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

Private Types

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

Private Member Functions

bool checkValidity () const
 

Static Private Member Functions

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

Private Attributes

_Id id_
 

Constructor & Destructor Documentation

◆ PlacementRef() [1/4]

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 125 of file placement-ref.hpp.

◆ PlacementRef() [2/4]

PlacementRef ( )
inline

Default is an NIL Placement ref.

It throws on any access.

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

◆ PlacementRef() [3/4]

PlacementRef ( PlacementRef< MX > const &  r)
inline
Parameters
rcopy ctor

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

◆ PlacementRef() [4/4]

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

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

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

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