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 
32 namespace 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 
55  protected:
56  /**
57  * @see armarx::ManagedIceObject::onInitComponent()
58  */
59  void onInitComponent() override;
60 
61  /**
62  * @see armarx::ManagedIceObject::onConnectComponent()
63  */
64  void onConnectComponent() override;
65 
66  /**
67  * @see armarx::ManagedIceObject::onDisconnectComponent()
68  */
69  void onDisconnectComponent() override;
70 
71  /**
72  * @see armarx::ManagedIceObject::onExitComponent()
73  */
74  void onExitComponent() override;
75 
76  /**
77  * @see PropertyUser::createPropertyDefinitions()
78  */
80 
81  private:
82  struct Properties
83  {
84  std::string shortcutPath;
85  };
86 
87  private:
88  SkillShortcutList registeredShortcuts;
89  Properties properties;
90  void loadShortcuts(const std::string& filename);
91  };
92 
93 } // namespace armarx
armarx::SkillDashboard::getShortcut
SkillShortcut getShortcut(const std::string &name, const ::Ice::Current &=::Ice::Current()) override
Definition: SkillDashboard.cpp:70
armarx::SkillDashboard::onExitComponent
void onExitComponent() override
Definition: SkillDashboard.cpp:129
armarx::SkillDashboard::addNewShortcut
void addNewShortcut(const SkillShortcut &newShortcut, const ::Ice::Current &=::Ice::Current()) override
Definition: SkillDashboard.cpp:84
armarx::SkillDashboard::onConnectComponent
void onConnectComponent() override
Definition: SkillDashboard.cpp:59
armarx::SkillDashboard::onDisconnectComponent
void onDisconnectComponent() override
Definition: SkillDashboard.cpp:124
armarx::SkillDashboard::onInitComponent
void onInitComponent() override
Definition: SkillDashboard.cpp:46
armarx::SkillDashboard::deleteShortcut
void deleteShortcut(const std::string &name, const ::Ice::Current &=::Ice::Current()) override
Definition: SkillDashboard.cpp:110
armarx::SkillDashboard::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: SkillDashboard.cpp:13
armarx::SkillDashboard::getShortcuts
SkillShortcutList getShortcuts(const ::Ice::Current &=::Ice::Current()) override
Definition: SkillDashboard.cpp:64
armarx::SkillDashboard
Definition: SkillDashboard.h:34
armarx::SkillDashboard::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: SkillDashboard.h:40
filename
std::string filename
Definition: VisualizationRobot.cpp:86
TaskUtil.h
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:91
IceUtil::Handle< class PropertyDefinitionContainer >
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27