SpecializedSkill.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace armarx::skills
7 {
8  template <class AronT>
9  class SpecializedSkill : public Skill
10  {
11  public:
12  using Base = Skill;
13  using ParamType = AronT;
14 
15  using Skill::Skill;
16  virtual ~SpecializedSkill() = default;
17 
18  void
19  setParameters(const AronT& d)
20  {
21  Base::setParameters(d.toAron());
22  }
23 
24  /// Overwrite getter for parameters. Shadow Skill::getParameters()
25  AronT
26  getParameters() const
27  {
28  AronT d;
29  d.fromAron(this->parameters);
30  return d;
31  }
32 
33  /// returns the accepted type of the skill
36  {
37  return AronT::ToAronType();
38  }
39 
40 
41  protected:
42  };
43 } // namespace armarx::skills
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:121
armarx::skills::SpecializedSkill
Definition: SpecializedSkill.h:9
armarx::skills::SpecializedSkill::~SpecializedSkill
virtual ~SpecializedSkill()=default
armarx::skills
This file is part of ArmarX.
Definition: PeriodicUpdateWidget.cpp:11
armarx::skills::Skill::parameters
armarx::aron::data::DictPtr parameters
Definition: Skill.h:297
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:35
armarx::skills::SpecializedSkill::getParameters
AronT getParameters() const
Overwrite getter for parameters. Shadow Skill::getParameters()
Definition: SpecializedSkill.h:26
armarx::skills::SpecializedSkill::setParameters
void setParameters(const AronT &d)
Definition: SpecializedSkill.h:19
Object.h
Skill.h
armarx::skills::SpecializedSkill< arondto::NamedConfigurationParams >::ParamType
arondto::NamedConfigurationParams ParamType
Definition: SpecializedSkill.h:13
armarx::skills::Skill
Base class for skills.
Definition: Skill.h:20
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36