38 template <
typename AronDataT,
typename DerivedT>
65 operator typename AronDataType::PointerType()
73 const auto& n = DerivedT::DynamicCast(other);
99 return clone(newPath);
102 data::dto::GenericDataPtr
111 if (!importance.has_value())
113 aron->importance = IceUtil::None;
119 aron->importance = *importance;
125 const auto importance =
aron->importance;
144 return std::dynamic_pointer_cast<DerivedT>(n);
150 return dynamic_cast<DerivedT&
>(n);
153 static const DerivedT&
156 return dynamic_cast<const DerivedT&
>(n);
169 <<
"The path was: " << n->getPath().toString() <<
".\n"
170 <<
"It has the descriptor: '"
173 <<
"And the typeid: " <<
typeid(n).name() <<
". Tried to cast to "
179 typename AronDataType::PointerType
aron;
const data::Descriptor descriptor
virtual VariantPtr navigateAbsolute(const Path &path) const =0
naviate absolute
Path getPath() const
get the path
data::dto::GenericDataPtr toAronDTO() const override
convert the variant to the ice representation
static DerivedT & DynamicCast(Variant &n)
std::shared_ptr< DerivedT > PointerType
static const DerivedT & DynamicCast(const Variant &n)
SpecializedVariantBase(const typename AronDataType::PointerType &o, const data::Descriptor descriptor, const Path &path=Path())
virtual bool operator==(const DerivedT &) const =0
bool operator==(const Variant &other) const override
VariantPtr navigateRelative(const Path &path) const override
navigate relative
SpecializedVariantBase()=delete
SpecializedVariantBase(const data::Descriptor descriptor, const Path &path=Path())
std::optional< float > getImportance() const override
get optional importance metadata for this data variant.
void setImportance(const std::optional< float > &importance) override
set optional importance metadata in [0, 1] for this data variant.
AronDataType::PointerType aron
static PointerType DynamicCastAndCheck(const VariantPtr &n)
static PointerType DynamicCast(const VariantPtr &n)
virtual ~SpecializedVariantBase()=default
virtual PointerType clone() const
VariantPtr cloneAsVariant(const Path &newPath) const override
virtual PointerType clone(const Path &newPath) const =0
virtual bool operator==(const PointerType &other) const =0
VariantPtr cloneAsVariant() const override
get a pointer to a copy of this variant
#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...
const std::map< data::Descriptor, std::string > Descriptor2String
std::shared_ptr< Variant > VariantPtr