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)
 
void add (std::initializer_list< Layer > layers)
 
void requestInteraction (Layer const &layer)
 Request interaction feedback for a particular layer.
 
void reset ()
 Reset all staged layers and interaction requests.
 

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.

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.

◆ add() [2/2]

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

◆ requestInteraction()

void requestInteraction ( Layer const & layer)
inline

Request interaction feedback for a particular layer.

Parameters
layerThe layer you want to get interaction feedback for.

◆ reset()

void reset ( )
inline

Reset all staged layers and interaction requests.

Member Data Documentation

◆ data_

viz::data::CommitInput data_

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