StagedCommit Struct Reference

A staged commit prepares multiple layers to be committed. More...

#include <RobotAPI/components/ArViz/Client/Client.h>

Public Member Functions

void add (Layer const &layer)
 Stage a layer to be committed later via client.apply(*this) More...
 
void add (std::initializer_list< Layer > layers)
 
void requestInteraction (Layer const &layer)
 Request interaction feedback for a particular layer. More...
 
void reset ()
 Reset all staged layers and interaction requests. More...
 

Public Attributes

viz::data::CommitInput data_
 

Detailed Description

A staged commit prepares multiple layers to be committed.

Add all relevant layer updates via .add(layer). Add layers for which you want interaction feedback via .requestInteraction(layer). Then, commit via client.apply(stagedCommit).

A staged commit can be reused for subsequent commits. Remember to call .reset() to clear the internal data structures.

As long as you keep the staged commits separate, this method is thread-safe. So you can have two threads calling .commit(A) and .commit(B) simultaneously without any locking mechanism.

Definition at line 31 of file Client.h.

Member Function Documentation

◆ add() [1/2]

void add ( Layer const &  layer)
inline

Stage a layer to be committed later via client.apply(*this)

Parameters
layerThe layer to be added to this staged commit.

Definition at line 37 of file Client.h.

+ Here is the caller graph for this function:

◆ add() [2/2]

void add ( std::initializer_list< Layer layers)
inline

Definition at line 42 of file Client.h.

◆ requestInteraction()

void requestInteraction ( Layer const &  layer)
inline

Request interaction feedback for a particular layer.

Parameters
layerThe layer you want to get interaction feedback for.

Definition at line 55 of file Client.h.

+ Here is the caller graph for this function:

◆ reset()

void reset ( )
inline

Reset all staged layers and interaction requests.

Definition at line 64 of file Client.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ data_

viz::data::CommitInput data_

Definition at line 71 of file Client.h.


The documentation for this struct was generated from the following file: