Lumiera  0.pre.03
»edit your freedom«
SessionServiceMutate Class Reference

#include "steam/mobject/session/session-service-mutate.hpp"

Description

Implementation-level service for resolving an Placement-ID.

Usually, this service is backed by the PlacementIndex of the current session – however, for the purpose of unit testing, this index may be overlaid temporarily, by using the SessionServiceMockIndex API.

Definition at line 61 of file session-service-mutate.hpp.

Public Types

typedef PlacementMO::ID const & PID
 
typedef PlacementMO const & PMO
 

Static Public Member Functions

static PID attach_toModel (PMO, PID)
 attach an object by placement onto the session. More...
 
static bool detach (PID)
 detach the denoted leaf element from the model. More...
 
static bool detach_and_clear (PID)
 detach the denoted element from the model including all children. More...
 

Member Function Documentation

◆ attach_toModel()

PlacementMO::ID const & attach_toModel ( PMO  newPlacement,
PID  scope 
)
static

attach an object by placement onto the session.

Implemented by registering a copy of the Placement into the PlacementIndex in the session. This copy establishes a new kind of "object instance", represented by a new placement-ID, which is returned and can be used to refer to this "instance" within the session from now on.

Parameters
scopethe (existing) parent scope where to attach the new element

Definition at line 109 of file session-services.cpp.

◆ detach_and_clear()

bool detach_and_clear ( PID  scope)
static

detach the denoted element from the model including all children.

Returns
true if actually erased something
Note
when specifying model root, all sub-elements will be cleared, but model root itself will be retained.

Definition at line 121 of file session-services.cpp.

Referenced by MORef< MO >::purge().

+ Here is the caller graph for this function:

◆ detach()

bool detach ( PID  leafElement)
static

detach the denoted leaf element from the model.

Returns
true if actually erased something
Exceptions
error::Fatalwhen attempting to remove the model root
error::Statewhen the given element contains sub elements

Definition at line 133 of file session-services.cpp.

References SessionServices< APIS, FRONT, SESS >::current.

+ Collaboration diagram for SessionServiceMutate:

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