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
32
34
35namespace armarx::armem
36{
37
46
47 std::string
49 {
50 return "MemoryNameSystem";
51 }
52
53 void
57
58 void
64
65 void
69
70 void
74
75 mns::dto::RegisterServerResult
76 MemoryNameSystem::registerServer(const mns::dto::RegisterServerInput& input,
77 const Ice::Current& c)
78 {
79 mns::dto::RegisterServerResult result = PluginUser::registerServer(input, c);
80 tab.rebuild = true;
81 return result;
82 }
83
84 mns::dto::RemoveServerResult
85 MemoryNameSystem::removeServer(const mns::dto::RemoveServerInput& input, const Ice::Current& c)
86 {
87 mns::dto::RemoveServerResult result = PluginUser::removeServer(input, c);
88 tab.rebuild = true;
89 return result;
90 }
91
92 // REMOTE GUI
93
94 void
96 {
97 using namespace armarx::RemoteGui::Client;
98
99 std::scoped_lock lock(mnsMutex);
101
102 VBoxLayout root = {grid, VSpacer()};
103 RemoteGui_createTab(getName(), root, &tab);
104 }
105
106 void
108 {
109 if (tab.rebuild.exchange(false))
110 {
112 }
113 }
114
115} // namespace armarx::armem
#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName)
Definition Decoupled.h:29
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.
Brief description of class MemoryNameSystem.
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)