Go to the documentation of this file.
30 #include "../Variant.h"
37 template <
typename AronDataT,
typename DerivedT>
64 operator typename AronDataType::PointerType()
72 const auto&
n = DerivedT::DynamicCast(other);
76 virtual bool operator==(
const DerivedT&)
const = 0;
98 return clone(newPath);
101 data::dto::GenericDataPtr
118 return std::dynamic_pointer_cast<DerivedT>(
n);
124 return dynamic_cast<DerivedT&
>(
n);
127 static const DerivedT&
130 return dynamic_cast<const DerivedT&
>(
n);
143 <<
"The path was: " <<
n->getPath().toString() <<
".\n"
144 <<
"It has the descriptor: '"
147 <<
"And the typeid: " <<
typeid(
n).name() <<
". Tried to cast to "
153 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)
constexpr auto n() noexcept
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
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