BOSubObjectFinder< DTOType, BOType > Class Template Reference

Finds aron objects with a given type name prefix in aron variants and returns them as BOs. More...

#include <RobotAPI/libraries/aron/common/util/object_finders.h>

+ Inheritance diagram for BOSubObjectFinder< DTOType, BOType >:

Public Member Functions

 BOSubObjectFinder ()=default
 
const std::map< std::string, BOType > & getFoundObjects ()
 Get the objects that have been found. More...
 
MapElements getObjectElements (DataInput &elementData, TypeInput &elementType) override
 
void visitObjectOnEnter (DataInput &elementData, TypeInput &elementType) override
 
void visitUnknown (DataInput &elementData, TypeInput &elementType) override
 
 ~BOSubObjectFinder () override=default
 
- Public Member Functions inherited from RecursiveConstTypedVariantVisitor
type::Descriptor getDescriptor (DataInput &o, TypeInput &n) override
 
MapElements getDictElements (DataInput &o, TypeInput &t) override
 
ListElements getListElements (DataInput &o, TypeInput &t) override
 
MapElements getObjectElements (DataInput &o, TypeInput &t) override
 
PairElements getPairElements (DataInput &o, TypeInput &t) override
 
TupleElements getTupleElements (DataInput &o, TypeInput &t) override
 
virtual void visitAronVariant (const data::BoolPtr &, const type::BoolPtr &)
 
virtual void visitAronVariant (const data::DoublePtr &, const type::DoublePtr &)
 
virtual void visitAronVariant (const data::FloatPtr &, const type::FloatPtr &)
 
virtual void visitAronVariant (const data::IntPtr &, const type::IntEnumPtr &)
 
virtual void visitAronVariant (const data::IntPtr &, const type::IntPtr &)
 
virtual void visitAronVariant (const data::LongPtr &, const type::LongPtr &)
 
virtual void visitAronVariant (const data::NDArrayPtr &, const type::ImagePtr &)
 
virtual void visitAronVariant (const data::NDArrayPtr &, const type::MatrixPtr &)
 
virtual void visitAronVariant (const data::NDArrayPtr &, const type::NDArrayPtr &)
 
virtual void visitAronVariant (const data::NDArrayPtr &, const type::PointCloudPtr &)
 
virtual void visitAronVariant (const data::NDArrayPtr &, const type::QuaternionPtr &)
 
virtual void visitAronVariant (const data::StringPtr &, const type::StringPtr &)
 
virtual void visitAronVariantOnEnter (const data::DictPtr &, const type::DictPtr &)
 
virtual void visitAronVariantOnEnter (const data::DictPtr &, const type::ObjectPtr &)
 
virtual void visitAronVariantOnEnter (const data::ListPtr &, const type::ListPtr &)
 
virtual void visitAronVariantOnEnter (const data::ListPtr &, const type::PairPtr &)
 
virtual void visitAronVariantOnEnter (const data::ListPtr &, const type::TuplePtr &)
 
virtual void visitAronVariantOnExit (const data::DictPtr &, const type::DictPtr &)
 
virtual void visitAronVariantOnExit (const data::DictPtr &, const type::ObjectPtr &)
 
virtual void visitAronVariantOnExit (const data::ListPtr &, const type::ListPtr &)
 
virtual void visitAronVariantOnExit (const data::ListPtr &, const type::PairPtr &)
 
virtual void visitAronVariantOnExit (const data::ListPtr &, const type::TuplePtr &)
 
void visitBool (DataInput &, TypeInput &) override
 
void visitDictOnEnter (DataInput &, TypeInput &) override
 
void visitDictOnExit (DataInput &, TypeInput &) override
 
void visitDouble (DataInput &, TypeInput &) override
 
void visitFloat (DataInput &, TypeInput &) override
 
void visitImage (DataInput &, TypeInput &) override
 
void visitInt (DataInput &, TypeInput &) override
 
void visitIntEnum (DataInput &, TypeInput &) override
 
void visitListOnEnter (DataInput &, TypeInput &) override
 
void visitListOnExit (DataInput &, TypeInput &) override
 
void visitLong (DataInput &, TypeInput &) override
 
void visitMatrix (DataInput &, TypeInput &) override
 
void visitNDArray (DataInput &, TypeInput &) override
 
void visitObjectOnEnter (DataInput &, TypeInput &) override
 
void visitObjectOnExit (DataInput &i, TypeInput &j) override
 
void visitPairOnEnter (DataInput &, TypeInput &) override
 
void visitPairOnExit (DataInput &, TypeInput &) override
 
void visitPointCloud (DataInput &, TypeInput &) override
 
void visitQuaternion (DataInput &, TypeInput &) override
 
void visitString (DataInput &, TypeInput &) override
 
void visitTupleOnEnter (DataInput &, TypeInput &) override
 
void visitTupleOnExit (DataInput &, TypeInput &) override
 
virtual ~RecursiveConstTypedVariantVisitor ()=default
 
- Public Member Functions inherited from RecursiveTypedVisitor< const data::VariantPtr, const type::VariantPtr >
virtual void visitAnyObject (DataInput &elementData, TypeInput &elementType)
 
virtual ~RecursiveTypedVisitor ()=default
 
- Public Member Functions inherited from TypedVisitorBase< const data::VariantPtr, const type::VariantPtr >
virtual type::Descriptor getDescriptor (DataInput &, TypeInput &)=0
 
virtual ~TypedVisitorBase ()=default
 

Additional Inherited Members

- Public Types inherited from RecursiveTypedVisitor< const data::VariantPtr, const type::VariantPtr >
using DataInput = typename TypedVisitorBase< const data::VariantPtr, const type::VariantPtr >::DataInput
 
using DataInputNonConst = typename std::remove_const< DataInput >::type
 
using ListElements = std::vector< std::pair< DataInputNonConst, TypeInputNonConst > >
 
using MapElements = std::map< std::string, std::pair< DataInputNonConst, TypeInputNonConst > >
 
using PairElements = std::pair< std::pair< DataInputNonConst, TypeInputNonConst >, std::pair< DataInputNonConst, TypeInputNonConst > >
 
using TupleElements = std::vector< std::pair< DataInputNonConst, TypeInputNonConst > >
 
using TypeInput = typename TypedVisitorBase< const data::VariantPtr, const type::VariantPtr >::TypeInput
 
using TypeInputNonConst = typename std::remove_const< TypeInput >::type
 
- Public Types inherited from TypedVisitorBase< const data::VariantPtr, const type::VariantPtr >
using DataInput = const data::VariantPtr
 
using TypeInput = const type::VariantPtr
 
- Static Public Member Functions inherited from RecursiveConstTypedVariantVisitor
static MapElements GetDictElements (DataInput &o, TypeInput &t)
 
static ListElements GetListElements (DataInput &o, TypeInput &t)
 
static MapElements GetObjectElements (DataInput &o, TypeInput &t)
 
static MapElements GetObjectElementsWithNullType (DataInput &o, TypeInput &t)
 
static PairElements GetPairElements (DataInput &o, TypeInput &t)
 
static TupleElements GetTupleElements (DataInput &o, TypeInput &t)
 

Detailed Description

template<typename DTOType, typename BOType>
class armarx::aron::BOSubObjectFinder< DTOType, BOType >

Finds aron objects with a given type name prefix in aron variants and returns them as BOs.

Construct it with the prefix you want to search for, then use visitRecursive to run the finder over the variant to search. Get a map of paths to your BOs using getFoundObjects.

Template Parameters
DTOTypethe generated aron type of your data.
BOTypethe type of your final BO.

Definition at line 83 of file object_finders.h.

Constructor & Destructor Documentation

◆ BOSubObjectFinder()

BOSubObjectFinder ( )
default

◆ ~BOSubObjectFinder()

~BOSubObjectFinder ( )
overridedefault

Member Function Documentation

◆ getFoundObjects()

const std::map<std::string, BOType>& getFoundObjects ( )
inline

Get the objects that have been found.

The keys are strings instead of aron::Paths because those don't support comparisons.

Returns
map of paths to BOs.

Definition at line 97 of file object_finders.h.

◆ getObjectElements()

MapElements getObjectElements ( DataInput elementData,
TypeInput elementType 
)
inlineoverridevirtual

◆ visitObjectOnEnter()

void visitObjectOnEnter ( DataInput elementData,
TypeInput elementType 
)
inlineoverridevirtual

Reimplemented from RecursiveTypedVisitor< const data::VariantPtr, const type::VariantPtr >.

Definition at line 103 of file object_finders.h.

+ Here is the call graph for this function:

◆ visitUnknown()

void visitUnknown ( DataInput elementData,
TypeInput elementType 
)
inlineoverridevirtual

The documentation for this class was generated from the following file: