SkillDashboard.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 RobotAPI::ArmarXObjects::ObjectPoseClientExample
17 * @author Leonie Leven ( leonie dot leven at student dot kit dot edu )
18 * @date 2024
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <list>
26
29
30#include <RobotAPI/interface/components/SkillDashboardInterface.h>
31
32namespace armarx
33{
35 virtual public armarx::Component,
36 virtual public armarx::SkillDashboardInterface
37 {
38 public:
39 std::string
40 getDefaultName() const override
41 {
42 return "SkillDashboard";
43 }
44
45 SkillShortcutList getShortcuts(const ::Ice::Current& = ::Ice::Current()) override;
46 SkillShortcut getShortcut(const std::string& name,
47 const ::Ice::Current& = ::Ice::Current()) override;
48 void addNewShortcut(const SkillShortcut& newShortcut,
49 const ::Ice::Current& = ::Ice::Current()) override;
50
51 void deleteShortcut(const std::string& name,
52 const ::Ice::Current& = ::Ice::Current()) override;
53
54 void exportShortcuts(const std::string& package,
55 const std::string& folder,
56 const std::string& name,
57 const ::Ice::Current& = ::Ice::Current()) override;
58
59 bool importShortcuts(const std::string& package,
60 const std::string& folder,
61 const std::string& name,
62 const ::Ice::Current& = ::Ice::Current()) override;
63
64
65 void saveShortcutOrder(const std::vector<std::string>& order,
66 const ::Ice::Current& = ::Ice::Current()) override;
67
68 std::vector<std::string>
69 getPathStructure(const ::Ice::Current& = ::Ice::Current()) override;
70
71 protected:
72 /**
73 * @see armarx::ManagedIceObject::onInitComponent()
74 */
75 void onInitComponent() override;
76
77 /**
78 * @see armarx::ManagedIceObject::onConnectComponent()
79 */
80 void onConnectComponent() override;
81
82 /**
83 * @see armarx::ManagedIceObject::onDisconnectComponent()
84 */
85 void onDisconnectComponent() override;
86
87 /**
88 * @see armarx::ManagedIceObject::onExitComponent()
89 */
90 void onExitComponent() override;
91
92 /**
93 * @see PropertyUser::createPropertyDefinitions()
94 */
96
97 private:
98 struct Properties
99 {
100 std::string shortcutPath;
101 };
102
103 private:
104 std::vector<std::string> shortcutOrder;
105 SkillShortcutList registeredShortcuts;
106 Properties properties;
107 bool loadShortcuts(const std::string& filename);
108 std::string packageName;
109 std::string pathToDashboard;
110 std::string dahsboardName;
111 };
112
113} // namespace armarx
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
void onInitComponent() override
bool importShortcuts(const std::string &package, const std::string &folder, const std::string &name, const ::Ice::Current &=::Ice::Current()) override
void deleteShortcut(const std::string &name, const ::Ice::Current &=::Ice::Current()) override
void addNewShortcut(const SkillShortcut &newShortcut, const ::Ice::Current &=::Ice::Current()) override
void onDisconnectComponent() override
SkillShortcut getShortcut(const std::string &name, const ::Ice::Current &=::Ice::Current()) override
SkillShortcutList getShortcuts(const ::Ice::Current &=::Ice::Current()) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void saveShortcutOrder(const std::vector< std::string > &order, const ::Ice::Current &=::Ice::Current()) override
void exportShortcuts(const std::string &package, const std::string &folder, const std::string &name, const ::Ice::Current &=::Ice::Current()) override
void onConnectComponent() override
std::vector< std::string > getPathStructure(const ::Ice::Current &=::Ice::Current()) override
void onExitComponent() override
std::string getDefaultName() const override
Retrieve default name of component.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.