SpecializedSkill.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 // Debug
8 
9 namespace armarx
10 {
11  namespace skills
12  {
13  template <class AronT>
14  class SpecializedSkill : public Skill
15  {
16  public:
17  using Base = Skill;
18  using ParamType = AronT;
19 
20  using Skill::Skill;
21  virtual ~SpecializedSkill() = default;
22 
23  void
24  setParameters(const AronT& d)
25  {
26  Base::setParameters(d.toAron());
27  }
28 
29  /// Overwrite getter for parameters. Shadow Skill::getParameters()
30  AronT
31  getParameters() const
32  {
33  AronT d;
34  d.fromAron(this->parameters);
35  return d;
36  }
37 
38  /// returns the accepted type of the skill
41  {
42  return AronT::ToAronType();
43  }
44 
45 
46  protected:
47  };
48  } // namespace skills
49 } // namespace armarx
armarx::skills::Skill::setParameters
void setParameters(const aron::data::DictPtr &d)
Hard set the parameters, ignoring everything that has been set or merged before.
Definition: Skill.cpp:98
armarx::skills::SpecializedSkill
Definition: SpecializedSkill.h:14
skills
This file is part of ArmarX.
armarx::skills::SpecializedSkill::~SpecializedSkill
virtual ~SpecializedSkill()=default
armarx::skills::Skill::parameters
armarx::aron::data::DictPtr parameters
Definition: Skill.h:333
armarx::skills::Skill::Skill
Skill()=delete
We completely remove the default constructor! A skill without a desciption cannot exist.
armarx::skills::SpecializedSkill::GetAcceptedType
static armarx::aron::type::ObjectPtr GetAcceptedType()
returns the accepted type of the skill
Definition: SpecializedSkill.h:40
armarx::skills::SpecializedSkill::getParameters
AronT getParameters() const
Overwrite getter for parameters. Shadow Skill::getParameters()
Definition: SpecializedSkill.h:31
NLohmannJSONConverter.h
armarx::skills::SpecializedSkill::setParameters
void setParameters(const AronT &d)
Definition: SpecializedSkill.h:24
Object.h
Skill.h
armarx::skills::SpecializedSkill< arondto::OpenHandParams >::ParamType
arondto::OpenHandParams ParamType
Definition: SpecializedSkill.h:18
armarx::skills::Skill
Base class for skills.
Definition: Skill.h:29
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28