From dc15830df68f8463b44e435de4a5e9a6ed782e94 Mon Sep 17 00:00:00 2001 From: Rainer Kartmann <rainer.kartmann@kit.edu> Date: Thu, 12 Aug 2021 08:03:18 +0200 Subject: [PATCH] Show type in Remote Gui --- .../armem/server/MemoryRemoteGui.cpp | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/source/RobotAPI/libraries/armem/server/MemoryRemoteGui.cpp b/source/RobotAPI/libraries/armem/server/MemoryRemoteGui.cpp index 6826523b3..57b495a52 100644 --- a/source/RobotAPI/libraries/armem/server/MemoryRemoteGui.cpp +++ b/source/RobotAPI/libraries/armem/server/MemoryRemoteGui.cpp @@ -3,6 +3,7 @@ #include "RemoteGuiAronDataVisitor.h" #include <RobotAPI/libraries/aron/core/navigator/data/AllNavigators.h> +#include <RobotAPI/libraries/aron/core/navigator/type/container/Object.h> #include <RobotAPI/libraries/aron/core/navigator/visitors/DataVisitor.h> #include <ArmarXCore/core/exceptions/local/ExpressionException.h> @@ -32,11 +33,27 @@ namespace armarx::armem::server return group; } + + static std::string getTypeString(const armem::base::detail::AronTyped& typed) + { + std::stringstream type; + if (typed.aronType()) + { + type << " (" << typed.aronType()->getName() << ")"; + } + else + { + type << " (no Aron type)"; + } + return type.str(); + } + template <class ...Args> MemoryRemoteGui::GroupBox MemoryRemoteGui::_makeGroupBox(const armem::base::CoreSegmentBase<Args...>& coreSegment) const { GroupBox group; - group.setLabel(makeGroupLabel("Core Segment", coreSegment.name(), coreSegment.size())); + group.setLabel(makeGroupLabel("Core Segment", coreSegment.name(), coreSegment.size()) + + getTypeString(coreSegment)); if (coreSegment.empty()) { @@ -49,11 +66,13 @@ namespace armarx::armem::server return group; } + template <class ...Args> MemoryRemoteGui::GroupBox MemoryRemoteGui::_makeGroupBox(const armem::base::ProviderSegmentBase<Args...>& providerSegment) const { GroupBox group; - group.setLabel(makeGroupLabel("Provider Segment", providerSegment.name(), providerSegment.size())); + group.setLabel(makeGroupLabel("Provider Segment", providerSegment.name(), providerSegment.size()) + + getTypeString(providerSegment)); if (providerSegment.empty()) { @@ -66,6 +85,7 @@ namespace armarx::armem::server return group; } + template <class ...Args> MemoryRemoteGui::GroupBox MemoryRemoteGui::_makeGroupBox(const armem::base::EntityBase<Args...>& entity) const { -- GitLab