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 
33 namespace armarx::RemoteGui
34 {
35  template <typename T>
37 
38  template <typename AronStructT>
39  requires isAronGenerated<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
armarx::RemoteGui::detail::GroupBoxBuilder
Definition: LayoutWidgets.h:166
armarx::RemoteGui
Definition: LightweightRemoteGuiComponentPlugin.h:30
RemoteGuiVisitors.h
armarx::aron::component_config::MakeConfigGuiVisitor::getGroupBoxBuilder
RemoteGui::detail::GroupBoxBuilder getGroupBoxBuilder() const
Definition: RemoteGuiVisitors.cpp:161
armarx::requires
requires(!aron::detail::DtoAndBoAreSame< DtoT, BoT >) void toAron(std
Definition: aron_conversions.h:346
Dict.h
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
RemoteGui.h
armarx::aron::component_config::MakeConfigGuiVisitor
Definition: RemoteGuiVisitors.h:47
forward_declarations.h
armarx::RemoteGui::isAronGenerated
concept isAronGenerated
Definition: RemoteGui.h:36
armarx::aron::data::visitRecursive
requires isRecursiveVisitor< RecursiveVisitorImplementation, typename RecursiveVisitorImplementation::Input > void visitRecursive(RecursiveVisitorImplementation &v, typename RecursiveVisitorImplementation::Input &o)
Definition: RecursiveVisitor.h:146
AronGeneratedClass.h
armarx::RemoteGui::makeConfigGui
requires isAronGenerated< AronStructT > detail::GroupBoxBuilder makeConfigGui(const std::string &name, const AronStructT &val)
Definition: RemoteGui.h:41