Skip to content
Snippets Groups Projects
Commit 32aee0ac authored by Fabian Paus's avatar Fabian Paus
Browse files

ArViz: Add usingProxy to component plugin

parent 2fd5bfd0
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,33 @@ Client Client::createForGuiPlugin(Component& component,
return client;
}
CommitResult Client::commit(const StagedCommit& commit)
{
CommitResult result;
result.data_ = storage->commitAndReceiveInteractions(commit.data_);
return result;
}
CommitResultAsync Client::commitAsync(const StagedCommit& commit)
{
CommitResultAsync result;
result.async = storage->begin_commitAndReceiveInteractions(commit.data_);
result.storage = storage;
return result;
}
void Client::commit(const std::vector<Layer>& layers)
{
data::LayerUpdateSeq updates;
updates.reserve(layers.size());
for (Layer const& layer : layers)
{
updates.push_back(layer.data_);
}
// This commit call still uses the legacy topic API
topic->updateLayers(updates);
}
}
......@@ -313,37 +313,16 @@ namespace viz
return StagedCommit();
}
CommitResult commit(StagedCommit const& commit)
{
CommitResult result;
result.data_ = storage->commitAndReceiveInteractions(commit.data_);
return result;
}
CommitResult commit(StagedCommit const& commit);
CommitResultAsync commitAsync(StagedCommit const& commit)
{
CommitResultAsync result;
result.async = storage->begin_commitAndReceiveInteractions(commit.data_);
result.storage = storage;
return result;
}
CommitResultAsync commitAsync(StagedCommit const& commit);
void commit(Layer const& layer)
{
commit({layer});
}
void commit(std::vector<Layer> const& layers)
{
data::LayerUpdateSeq updates;
updates.reserve(layers.size());
for (Layer const& layer : layers)
{
updates.push_back(layer.data_);
}
// This commit call still uses the legacy topic API
topic->updateLayers(updates);
}
void commit(std::vector<Layer> const& layers);
void commitLayerContaining(std::string const& name)
{
......
......@@ -29,6 +29,7 @@ namespace armarx::plugins
void ArVizComponentPlugin::preOnInitComponent()
{
parent().offeringTopic(getTopicName());
parent().usingProxy(getStorageName());
}
void ArVizComponentPlugin::preOnConnectComponent()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment