35 template <
typename AronTypeT,
typename DerivedT>
63 const auto& n =
dynamic_cast<const DerivedT&
>(other);
70 return *(this->
aron) == *(other.aron);
74 type::dto::GenericTypePtr
96 if (!importance.has_value())
98 aron->importance = IceUtil::None;
104 aron->importance = *importance;
110 const auto importance =
aron->importance;
129 return dynamic_cast<DerivedT&
>(n);
132 static const DerivedT&
135 return dynamic_cast<const DerivedT&
>(n);
138 static std::shared_ptr<DerivedT>
141 return std::dynamic_pointer_cast<DerivedT>(n);
144 static std::shared_ptr<DerivedT>
152 auto casted = std::dynamic_pointer_cast<DerivedT>(n);
158 typename AronTypeT::PointerType
aron;
virtual VariantPtr navigateAbsolute(const Path &path) const =0
naviate absolute
Variant(const type::Descriptor &descriptor, const Path &path=Path())
const type::Descriptor descriptor
static DerivedT & DynamicCast(Variant &n)
static const DerivedT & DynamicCast(const Variant &n)
SpecializedVariantBase(const AronTypeT &o, const type::Descriptor &descriptor, const Path &path)
AronTypeT::PointerType aron
type::Maybe getMaybe() const override
get the maybe type
static std::shared_ptr< DerivedT > DynamicCastAndCheck(const VariantPtr &n)
bool operator==(const Variant &other) const override
VariantPtr navigateRelative(const Path &path) const override
navigate relative
bool operator==(const DerivedT &other) const
void setMaybe(const type::Maybe m) override
set the maybetype of this type
std::optional< float > getImportance() const override
get optional importance metadata for this type variant.
void setImportance(const std::optional< float > &importance) override
set optional importance metadata in [0, 1] for this type variant.
SpecializedVariantBase(const type::Descriptor &descriptor, const Path &path)
static std::shared_ptr< DerivedT > DynamicCast(const VariantPtr &n)
virtual ~SpecializedVariantBase()=default
type::dto::GenericTypePtr toAronDTO() const override
convert this variant to a dto object.
#define ARMARX_CHECK_LESS_EQUAL(lhs, rhs)
This macro evaluates whether lhs is less or equal (<=) rhs and if it turns out to be false it will th...
#define ARMARX_CHECK_GREATER_EQUAL(lhs, rhs)
This macro evaluates whether lhs is greater or equal (>=) rhs and if it turns out to be false it will...
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
std::shared_ptr< Variant > VariantPtr