Go to the documentation of this file.
29 #include <unordered_map>
32 #include "../Variant.h"
38 template <
typename AronDataT,
typename DerivedT>
65 operator typename AronDataType::PointerType()
73 const auto& n = DerivedT::DynamicCast(other);
77 virtual bool operator==(
const DerivedT&)
const = 0;
99 return clone(newPath);
102 data::dto::GenericDataPtr
119 return std::dynamic_pointer_cast<DerivedT>(n);
125 return dynamic_cast<DerivedT&
>(n);
128 static const DerivedT&
131 return dynamic_cast<const DerivedT&
>(n);
144 <<
"The path was: " << n->getPath().toString() <<
".\n"
145 <<
"It has the descriptor: '"
148 <<
"And the typeid: " <<
typeid(n).name() <<
". Tried to cast to "
154 typename AronDataType::PointerType
aron;
const data::Descriptor descriptor
VariantPtr navigateRelative(const Path &path) const override
navigate relative
const std::map< data::Descriptor, std::string > Descriptor2String
#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...
Path getPath() const
get the path
static PointerType DynamicCastAndCheck(const VariantPtr &n)
virtual PointerType clone() const
virtual VariantPtr navigateAbsolute(const Path &path) const =0
naviate absolute
SpecializedVariantBase(const typename AronDataType::PointerType &o, const data::Descriptor descriptor, const Path &path=Path())
static PointerType DynamicCast(const VariantPtr &n)
std::shared_ptr< Variant > VariantPtr
SpecializedVariantBase()=delete
virtual ~SpecializedVariantBase()=default
static const DerivedT & DynamicCast(const Variant &n)
VariantPtr cloneAsVariant(const Path &newPath) const override
static DerivedT & DynamicCast(Variant &n)
data::dto::GenericDataPtr toAronDTO() const override
convert the variant to the ice representation
bool operator==(const Variant &other) const override
std::filesystem::path Path
Path getWithoutPrefix(const Path &) const
data::dto::AronInt AronDataType
VariantPtr cloneAsVariant() const override
get a pointer to a copy of this variant
AronDataType::PointerType aron
SpecializedVariantBase(const data::Descriptor descriptor, const Path &path=Path())
std::shared_ptr< DerivedT > PointerType