MemoryNameSystem.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package RobotAPI::ArmarXObjects::MemoryNameSystem
17 * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18 * @date 2020
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#include "MemoryNameSystem.h"
24
25#include <SimoxUtility/algorithm/string.h>
26
28
30
31namespace armarx::armem
32{
33
42
43 std::string
45 {
46 return "MemoryNameSystem";
47 }
48
49 void
53
54 void
60
61 void
65
66 void
70
71 mns::dto::RegisterServerResult
72 MemoryNameSystem::registerServer(const mns::dto::RegisterServerInput& input,
73 const Ice::Current& c)
74 {
75 mns::dto::RegisterServerResult result = PluginUser::registerServer(input, c);
76 tab.rebuild = true;
77 return result;
78 }
79
80 mns::dto::RemoveServerResult
81 MemoryNameSystem::removeServer(const mns::dto::RemoveServerInput& input, const Ice::Current& c)
82 {
83 mns::dto::RemoveServerResult result = PluginUser::removeServer(input, c);
84 tab.rebuild = true;
85 return result;
86 }
87
88 // REMOTE GUI
89
90 void
92 {
93 using namespace armarx::RemoteGui::Client;
94
95 std::scoped_lock lock(mnsMutex);
97
98 VBoxLayout root = {grid, VSpacer()};
99 RemoteGui_createTab(getName(), root, &tab);
100 }
101
102 void
104 {
105 if (tab.rebuild.exchange(false))
106 {
108 }
109 }
110
111} // namespace armarx::armem
constexpr T c
Default component property definition container.
Definition Component.h:70
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition Component.cpp:90
std::string getName() const
Retrieve name of object.
mns::dto::RegisterServerResult registerServer(const mns::dto::RegisterServerInput &input, const Ice::Current &) override
mns::dto::RemoveServerResult removeServer(const mns::dto::RemoveServerInput &input, const Ice::Current &) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
std::string getDefaultName() const override
armarx::RemoteGui::Client::GridLayout RemoteGui_buildInfoGrid()
Builds a RemoteGui grid containing information about registered memories.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
void RemoteGui_createTab(std::string const &name, RemoteGui::Client::Widget const &rootWidget, RemoteGui::Client::Tab *tab)