RemoteGui.h
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 robdekon
17 * @author Christoph Pohl ( christoph dot pohl at kit dot edu )
18 * @date 07.09.22
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
26
30
31#include "RemoteGuiVisitors.h"
32
33namespace armarx::RemoteGui
34{
35 template <typename T>
36 concept isAronGenerated = std::is_base_of<armarx::aron::cpp::AronGeneratedClass, T>::value;
37
38 template <typename AronStructT>
41 makeConfigGui(const std::string& name, const AronStructT& val)
42 {
44 armarx::aron::data::visitRecursive(vis, val.toAron(), val.ToAronType());
45 return vis.getGroupBoxBuilder();
46 }
47
48 // template <typename AronStructT>
49 // requires isAronGenerated<AronStructT>
50 // void getValueFromMap(AronStructT& cfg,
51 // RemoteGui::ValueMap const& values, std::string const& name)
52 // {
53 // armarx::aron::component_config::GetValueFromMapVisitor vis(&values);
54 // auto data = std::static_pointer_cast<armarx::aron::data::Variant>(cfg.toAron());
55 // auto type = cfg.ToAronType();
56 // armarx::aron::data::visitRecursive(vis, data, type);
57 // cfg.fromAron(std::static_pointer_cast<armarx::aron::data::Dict>(data));
58 // }
59
60} // namespace armarx::RemoteGui
RemoteGui::detail::GroupBoxBuilder getGroupBoxBuilder() const
detail::GroupBoxBuilder makeConfigGui(const std::string &name, const AronStructT &val)
Definition RemoteGui.h:41
void visitRecursive(RecursiveVisitorImplementation &v, typename RecursiveVisitorImplementation::Input &o)