Go to the documentation of this file.
27 #include "../../variant/All.h"
28 #include "../../../type/visitor/variant/VariantVisitor.h"
41 return n->getDescriptor();
283 return x->getElements();
294 return x->getElements();
490 std::map<std::string, std::pair<data::VariantPtr, type::VariantPtr>>
ret;
498 for (
const auto& [key, e] : x->getElements())
500 auto ct = y->getMemberType(key);
501 ret.insert({key, {e, ct}});
510 std::map<std::string, std::pair<aron::data::VariantPtr, aron::type::VariantPtr>>
ret;
516 for (
const auto& [key, e] :
data->getElements())
518 if (type && type->hasMemberType(key))
520 auto memberType = type->getMemberType(key);
521 ret.insert({key, {e, memberType}});
525 ret.insert({key, {e,
nullptr}});
535 std::map<std::string, std::pair<data::VariantPtr, type::VariantPtr>>
ret;
539 auto ac = y ? y->getAcceptedType() :
nullptr;
543 for (
const auto& [key, e] : x->getElements())
545 ret.insert({key, {e, ac}});
554 std::vector<std::pair<data::VariantPtr, type::VariantPtr>>
ret;
558 auto ac = y ? y->getAcceptedType() :
nullptr;
562 for (
const auto& e : x->getElements())
564 ret.push_back({e, ac});
580 auto e0 = x->getElement(0);
581 auto ac0 = y->getFirstAcceptedType();
582 auto e1 = x->getElement(1);
583 auto ac1 = y->getSecondAcceptedType();
584 return {{e0, ac0}, {e1, ac1}};
592 std::vector<std::pair<data::VariantPtr, type::VariantPtr>>
ret;
601 for (
const auto& e : x->getElements())
603 auto ac = y->getAcceptedType(i++);
604 ret.push_back({e, ac});
static TupleElements GetTupleElements(DataInput &o, TypeInput &t)
void visitListOnExit(Input &i) override
virtual void visitAronVariantOnEnter(const data::DictPtr &)
void visitDouble(DataInput &, TypeInput &) override
std::shared_ptr< class Matrix > MatrixPtr
ReaderT::InputType T & ret
void visitString(DataInput &, TypeInput &) override
void visitObjectOnEnter(DataInput &, TypeInput &) override
void visitString(Input &i) override
type::Descriptor getDescriptor(DataInput &i, TypeInput &j) override
void visitMatrix(DataInput &, TypeInput &) override
void visitLong(DataInput &, TypeInput &) override
void visitListOnExit(DataInput &, TypeInput &) override
void visitTupleOnEnter(DataInput &, TypeInput &) override
static data::Descriptor GetDescriptor(Input &n)
void visitDouble(Input &i) override
std::shared_ptr< class Image > ImagePtr
std::shared_ptr< class NDArray > NDArrayPtr
virtual void visitAronVariant(const data::DictPtr &, const type::ObjectPtr &)
TupleElements getTupleElements(DataInput &o, TypeInput &t) override
virtual void visitAronVariantOnExit(const data::DictPtr &)
static PairElements GetPairElements(DataInput &o, TypeInput &t)
void visitObjectOnExit(DataInput &i, TypeInput &j) override
void visitBool(DataInput &, TypeInput &) override
#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...
void visitFloat(Input &i) override
void visitMatrix(DataInput &, TypeInput &) override
virtual void visitAronVariantOnExit(const data::DictPtr &, const type::ObjectPtr &)
void visitBool(Input &i) override
virtual void visitAronVariantOnEnter(const data::DictPtr &, const type::ObjectPtr &)
void visitDictOnExit(DataInput &, TypeInput &) override
std::shared_ptr< Long > LongPtr
void visitTupleOnExit(DataInput &, TypeInput &) override
void visitDictOnExit(Input &i) override
virtual void visitAronVariant(const data::NDArrayPtr &, const type::MatrixPtr &)
std::map< std::string, std::pair< DataInputNonConst, TypeInputNonConst > > MapElements
static MapElements GetObjectElementsWithNullType(DataInput &o, TypeInput &t)
std::shared_ptr< NDArray > NDArrayPtr
const std::map< Descriptor, aron::type::Descriptor > Data2TypeDescriptor
std::shared_ptr< Double > DoublePtr
typename VisitorBase< const data::VariantPtr >::Input Input
void visitDouble(Input &i) override
std::shared_ptr< class Tuple > TuplePtr
void visitBool(Input &i) override
std::pair< std::pair< DataInputNonConst, TypeInputNonConst >, std::pair< DataInputNonConst, TypeInputNonConst > > PairElements
static PointerType DynamicCastAndCheck(const VariantPtr &n)
void visitDictOnEnter(Input &i) override
std::shared_ptr< class PointCloud > PointCloudPtr
void visitQuaternion(DataInput &, TypeInput &) override
void visitString(DataInput &, TypeInput &) override
void visitLong(Input &i) override
void visitDictOnExit(Input &i) override
std::shared_ptr< class Float > FloatPtr
void visitFloat(DataInput &, TypeInput &) override
std::map< std::string, InputNonConst > getDictElements(Input &n) override
static PointerType DynamicCast(const VariantPtr &n)
void visitImage(DataInput &, TypeInput &) override
void visitListOnEnter(Input &i) override
void visitDict(DataInput &, TypeInput &) override
void visitInt(Input &i) override
void visitInt(DataInput &, TypeInput &) override
ListElements getListElements(Input &n) override
std::shared_ptr< class List > ListPtr
std::shared_ptr< class Long > LongPtr
void visitPairOnExit(DataInput &, TypeInput &) override
void visitNDArray(Input &i) override
void visitInt(Input &i) override
void visitPairOnEnter(DataInput &, TypeInput &) override
void visitFloat(Input &i) override
std::shared_ptr< class String > StringPtr
virtual void visitAronVariant(const data::NDArrayPtr &)
data::Descriptor getDescriptor(Input &n) override
MapElements getDictElements(Input &n) override
void visitIntEnum(DataInput &, TypeInput &) override
MapElements getDictElements(DataInput &o, TypeInput &t) override
void visitDict(Input &i) override
typename TypedVisitorBase< const data::VariantPtr, const type::VariantPtr >::TypeInput TypeInput
static ListElements GetListElements(Input &n)
void visitDictOnEnter(Input &i) override
data::Descriptor getDescriptor(Input &n) override
void visitFloat(DataInput &, TypeInput &) override
void visitDictOnEnter(DataInput &, TypeInput &) override
std::shared_ptr< class Pair > PairPtr
std::shared_ptr< class Dict > DictPtr
type::Descriptor getDescriptor(DataInput &o, TypeInput &n) override
std::vector< InputNonConst > getListElements(Input &n) override
void visitString(Input &i) override
const data::VariantPtr DataInput
std::shared_ptr< class Bool > BoolPtr
void visitInt(DataInput &, TypeInput &) override
void visitNDArray(Input &i) override
A convenience header to include all aron files (full include, not forward declared)
typename TypedVisitorBase< const data::VariantPtr, const type::VariantPtr >::DataInput DataInput
void visitLong(Input &i) override
void visitListOnEnter(Input &i) override
void visitObject(DataInput &i, TypeInput &j) override
void visitNDArray(DataInput &, TypeInput &) override
void visitBool(Input &i) override
std::shared_ptr< Dict > DictPtr
void visitNDArray(Input &i) override
void visitListOnEnter(DataInput &, TypeInput &) override
static MapElements GetDictElements(DataInput &o, TypeInput &t)
virtual void visitAronVariant(const data::DictPtr &)
const type::VariantPtr TypeInput
virtual void visitAronVariantOnEnter(data::DictPtr &)
void visitLong(Input &i) override
virtual void visitAronVariant(data::NDArrayPtr &)
static std::shared_ptr< Object > DynamicCastAndCheck(const VariantPtr &n)
data::Descriptor getDescriptor(Input &n) override
void visitLong(DataInput &, TypeInput &) override
static MapElements GetObjectElements(DataInput &o, TypeInput &t)
std::shared_ptr< Float > FloatPtr
void visitFloat(Input &i) override
std::vector< std::pair< DataInputNonConst, TypeInputNonConst > > ListElements
void visitTuple(DataInput &, TypeInput &) override
void visitBool(DataInput &, TypeInput &) override
std::shared_ptr< String > StringPtr
void visitPair(DataInput &, TypeInput &) override
static type::Descriptor GetDescriptor(Input &n)
void visitList(Input &i) override
std::shared_ptr< IntEnum > IntEnumPtr
std::shared_ptr< Object > ObjectPtr
void visitDouble(DataInput &, TypeInput &) override
void visitNDArray(DataInput &, TypeInput &) override
static MapElements GetDictElements(Input &n)
std::vector< InputNonConst > ListElements
std::shared_ptr< Int > IntPtr
void visitIntEnum(DataInput &, TypeInput &) override
ListElements getListElements(DataInput &o, TypeInput &t) override
std::shared_ptr< class Quaternion > QuaternionPtr
std::shared_ptr< class Int > IntPtr
MapElements getObjectElements(DataInput &o, TypeInput &t) override
void visitImage(DataInput &, TypeInput &) override
std::shared_ptr< class Double > DoublePtr
std::shared_ptr< List > ListPtr
std::map< std::string, InputNonConst > MapElements
void visitQuaternion(DataInput &, TypeInput &) override
static ListElements GetListElements(DataInput &o, TypeInput &t)
void visitList(DataInput &, TypeInput &) override
void visitPointCloud(DataInput &, TypeInput &) override
const data::VariantPtr Input
PairElements getPairElements(DataInput &o, TypeInput &t) override
void visitInt(Input &i) override
void visitDouble(Input &i) override
void visitString(Input &i) override
virtual void visitAronVariantOnExit(data::DictPtr &)
static type::Descriptor GetDescriptor(DataInput &i, TypeInput &j)
void visitListOnExit(Input &i) override
std::vector< std::pair< DataInputNonConst, TypeInputNonConst > > TupleElements
std::shared_ptr< Bool > BoolPtr
void visitPointCloud(DataInput &, TypeInput &) override