SkillDescription.cpp
Go to the documentation of this file.
1#include "SkillDescription.h"
2
5
6namespace 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
69 bool
71 {
72 return this->skillId == other.skillId && this->description == other.description &&
74 this->timeout == other.timeout && this->parametersType == other.parametersType &&
75 this->resultType == other.resultType;
76 }
77 } // namespace skills
78} // namespace armarx
static data::dto::DictPtr ToAronDictDTO(const PointerType &navigator)
Definition Dict.cpp:140
static PointerType FromAronDictDTO(const data::dto::DictPtr &aron)
Definition Dict.cpp:130
static ObjectPtr FromAronObjectDTO(const type::dto::AronObjectPtr &, const aron::Path &path=aron::Path())
Definition Object.cpp:54
static type::dto::AronObjectPtr ToAronObjectDTO(const ObjectPtr &)
Definition Object.cpp:64
Represents a duration.
Definition Duration.h:17
static SkillID FromIce(const manager::dto::SkillID &)
Definition SkillID.cpp:36
void toIce(dto::ClockType::ClockTypeEnum &dto, const ClockType &bo)
void fromIce(const dto::ClockType::ClockTypeEnum &dto, ClockType &bo)
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
bool operator==(const SkillDescription &other) const
manager::dto::SkillDescription toManagerIce() const
aron::data::DictPtr rootProfileDefaults
aron::type::ObjectPtr parametersType
provider::dto::SkillDescription toProviderIce() const
static SkillDescription FromIce(const provider::dto::SkillDescription &i, const std::optional< ProviderID > &=std::nullopt)
armarx::core::time::Duration timeout