9 std::string
const& topicNameProperty,
10 std::string
const& storageNameProperty)
13 component.getTopicFromProperty(topic, topicNameProperty);
16 std::string storageName;
17 if (
component.hasProperty(storageNameProperty))
19 storageName =
component.getProperty<std::string>(storageNameProperty);
23 storageName =
"ArVizStorage";
29 std::string
const& topicName,
30 std::string
const& storageName)
34 <<
"ArViz client must be created with non-empty component name.";
44 client.componentName = componentName;
51 Topic::ProxyType
const& topic,
52 StorageAndTopicInterfacePrx
const& storage)
55 client.componentName = componentName;
57 client.storage = storage;
63 std::string
const& topicName,
64 std::string
const& storageName)
68 std::size_t dashPos = name.find(
'-');
69 if (dashPos != std::string::npos)
71 name = name.substr(0, dashPos);
73 client.componentName = name;
74 component.getTopic(client.topic, topicName);
75 component.getProxy(client.storage, storageName);
83 <<
"Layers must be created with non-empty component name.";
85 return Layer(componentName, name);
94 result.
data_ = storage->commitAndReceiveInteractions(
commit.data_);
104 result.
async = storage->begin_commitAndReceiveInteractions(
commit.data_);
112 data::LayerUpdateSeq updates;
113 updates.reserve(layers.size());
116 updates.push_back(
layer.data_);
120 topic->updateLayers(updates);
#define ARMARX_CHECK_NOT_EMPTY(c)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
The ManagedIceObject is the base class for all ArmarX objects.
TopicProxyType getTopic(const std::string &name)
Returns a proxy of the specified topic.
std::string getName() const
Retrieve name of object.
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
static Client createFromProxies(std::string const &componentName, armarx::viz::Topic::ProxyType const &topic, armarx::viz::StorageAndTopicInterfacePrx const &storage)
virtual Layer layer(std::string const &name) const
CommitResult commit(StagedCommit const &commit)
CommitResultAsync commitAsync(StagedCommit const &commit)
static Client createForGuiPlugin(armarx::Component &component, std::string const &topicName="ArVizTopic", std::string const &storageName="ArVizStorage")
static Client createFromTopic(std::string const &componentName, armarx::viz::Topic::ProxyType const &topic)
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
This file is part of ArmarX.
Ice::AsyncResultPtr async
armarx::viz::StorageInterfacePrx storage
A staged commit prepares multiple layers to be committed.