SkillDescription.cpp
Go to the documentation of this file.
1 #include "SkillDescription.h"
2 
5 
6 namespace armarx
7 {
8  namespace skills
9  {
10  provider::dto::SkillDescription
12  {
13  provider::dto::SkillDescription ret;
16  ret.description = description;
17  ret.skillId = skillId.toProviderIce();
19 
21  return ret;
22  }
23 
24  manager::dto::SkillDescription
26  {
27  manager::dto::SkillDescription ret;
30  ret.description = description;
31  ret.skillId = skillId.toManagerIce();
33 
35  return ret;
36  }
37 
39  SkillDescription::FromIce(const provider::dto::SkillDescription& i,
40  const std::optional<ProviderID>& pid)
41  {
43  armarx::core::time::fromIce(i.timeout, _d);
44  return SkillDescription{
45  .skillId = SkillID::FromIce(i.skillId, pid),
46  .description = i.description,
47  .rootProfileDefaults =
48  armarx::aron::data::Dict::FromAronDictDTO(i.rootProfileDefaults),
49  .timeout = _d,
50  .parametersType = armarx::aron::type::Object::FromAronObjectDTO(i.parametersType),
51  .resultType = armarx::aron::type::Object::FromAronObjectDTO(i.resultType)};
52  }
53 
55  SkillDescription::FromIce(const manager::dto::SkillDescription& i)
56  {
58  armarx::core::time::fromIce(i.timeout, _d);
59  return SkillDescription{
60  .skillId = SkillID::FromIce(i.skillId),
61  .description = i.description,
62  .rootProfileDefaults =
63  armarx::aron::data::Dict::FromAronDictDTO(i.rootProfileDefaults),
64  .timeout = _d,
65  .parametersType = armarx::aron::type::Object::FromAronObjectDTO(i.parametersType),
66  .resultType = armarx::aron::type::Object::FromAronObjectDTO(i.resultType)};
67  }
68  } // namespace skills
69 } // namespace armarx
armarx::aron::ret
ReaderT::InputType T & ret
Definition: rw.h:21
skills
This file is part of ArmarX.
armarx::skills::SkillDescription::description
std::string description
Definition: SkillDescription.h:21
armarx::core::time::fromIce
void fromIce(const dto::ClockType::ClockTypeEnum &dto, ClockType &bo)
Definition: ice_conversions.cpp:12
armarx::skills::SkillDescription::timeout
armarx::core::time::Duration timeout
Definition: SkillDescription.h:23
armarx::skills::SkillDescription
Definition: SkillDescription.h:18
armarx::core::time::toIce
void toIce(dto::ClockType::ClockTypeEnum &dto, const ClockType &bo)
Definition: ice_conversions.cpp:33
ice_conversions.h
armarx::skills::SkillID::toManagerIce
manager::dto::SkillID toManagerIce() const
Definition: SkillID.cpp:51
armarx::aron::data::Dict::FromAronDictDTO
static PointerType FromAronDictDTO(const data::dto::DictPtr &aron)
Definition: Dict.cpp:129
armarx::skills::SkillDescription::resultType
aron::type::ObjectPtr resultType
Definition: SkillDescription.h:25
armarx::skills::SkillDescription::toManagerIce
manager::dto::SkillDescription toManagerIce() const
Definition: SkillDescription.cpp:25
armarx::aron::type::Object::FromAronObjectDTO
static ObjectPtr FromAronObjectDTO(const type::dto::AronObjectPtr &, const aron::Path &path=aron::Path())
Definition: Object.cpp:54
armarx::skills::SkillDescription::skillId
SkillID skillId
Definition: SkillDescription.h:20
armarx::skills::SkillID::FromIce
static SkillID FromIce(const manager::dto::SkillID &)
Definition: SkillID.cpp:32
armarx::aron::data::Dict::ToAronDictDTO
static data::dto::DictPtr ToAronDictDTO(const PointerType &navigator)
Definition: Dict.cpp:139
armarx::skills::SkillDescription::rootProfileDefaults
aron::data::DictPtr rootProfileDefaults
Definition: SkillDescription.h:22
armarx::skills::SkillDescription::toProviderIce
provider::dto::SkillDescription toProviderIce() const
Definition: SkillDescription.cpp:11
armarx::aron::type::Object::ToAronObjectDTO
static type::dto::AronObjectPtr ToAronObjectDTO(const ObjectPtr &)
Definition: Object.cpp:64
armarx::core::time::Duration
Represents a duration.
Definition: Duration.h:17
armarx::skills::SkillID::toProviderIce
provider::dto::SkillID toProviderIce() const
Definition: SkillID.cpp:58
armarx::skills::SkillDescription::parametersType
aron::type::ObjectPtr parametersType
Definition: SkillDescription.h:24
armarx::skills::SkillDescription::FromIce
static SkillDescription FromIce(const provider::dto::SkillDescription &i, const std::optional< ProviderID > &=std::nullopt)
Definition: SkillDescription.cpp:39
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
ice_conversions.h
SkillDescription.h