42 add(std::initializer_list<Layer> layers)
44 data_.updates.reserve(
data_.updates.size() + layers.size());
45 for (
Layer const& layer : layers)
47 data_.updates.push_back(layer.data_);
58 data_.interactionComponent = layer.
data_.component;
59 data_.interactionLayers.push_back(layer.
data_.name);
68 data_.updates.clear();
69 data_.interactionComponent.clear();
70 data_.interactionLayers.clear();
81 return data_.revision;
123 std::string
const& topicNameProperty =
"ArVizTopicName",
124 std::string
const& storageNameProperty =
"ArVizStorageName");
127 std::string
const& topicName =
"ArVizTopic",
128 std::string
const& storageName =
"ArVizStorage");
132 armarx::viz::Topic::ProxyType
const& topic);
136 armarx::viz::Topic::ProxyType
const& topic,
137 armarx::viz::StorageAndTopicInterfacePrx
const& storage);
140 std::string
const& topicName =
"ArVizTopic",
141 std::string
const& storageName =
"ArVizStorage");
143 virtual Layer layer(std::string
const& name)
const;
158 std::vector<Layer> layers;
159 layers.push_back(
layer);
163 void commit(std::vector<Layer>
const& layers);
168 std::vector<viz::Layer> layers;
169 layers.push_back(this->
layer(name));
173 template <
typename ElementT>
177 std::vector<viz::Layer> layers;
179 newLayer.
add(element);
186 std::vector<viz::Layer> layers;
195 this->componentName = name;
199 std::string componentName;
200 armarx::viz::StorageInterfacePrx storage;
201 armarx::viz::TopicPrx
topic;
Baseclass for all ArmarX ManagedIceObjects requiring properties.
The ManagedIceObject is the base class for all ArmarX objects.
void updateComponentName(std::string const &name)
static Client createFromProxies(std::string const &componentName, armarx::viz::Topic::ProxyType const &topic, armarx::viz::StorageAndTopicInterfacePrx const &storage)
void commitDeleteLayer(std::string const &name)
virtual Layer layer(std::string const &name) const
void commitLayerContaining(std::string const &name, ElementT const &element)
CommitResult commit(StagedCommit const &commit)
CommitResultAsync commitAsync(StagedCommit const &commit)
void commit(Layer const &layer)
static Client createForGuiPlugin(armarx::Component &component, std::string const &topicName="ArVizTopic", std::string const &storageName="ArVizStorage")
void commitLayerContaining(std::string const &name)
Client(const Client &)=default
virtual ~Client()=default
static Client createFromTopic(std::string const &componentName, armarx::viz::Topic::ProxyType const &topic)
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
Ice::AsyncResultPtr async
armarx::viz::StorageInterfacePrx storage
CommitResult waitAndGet() const
InteractionFeedbackRange interactions() const
void add(ElementT const &element)
A staged commit prepares multiple layers to be committed.
void requestInteraction(Layer const &layer)
Request interaction feedback for a particular layer.
void add(Layer const &layer)
Stage a layer to be committed later via client.apply(*this)
void add(std::initializer_list< Layer > layers)
viz::data::CommitInput data_
void reset()
Reset all staged layers and interaction requests.