Pair Class Reference

The Pair class. More...

#include <RobotAPI/libraries/aron/core/type/variant/container/Pair.h>

+ Inheritance diagram for Pair:

Public Member Functions

void addAcceptedType (const VariantPtr &)
 
size_t childrenSize () const override
 
std::pair< VariantPtr, VariantPtrgetAcceptedTypes () const
 
std::vector< VariantPtrgetChildren () const override
 get all child elements More...
 
VariantPtr getFirstAcceptedType () const
 
std::string getFullName () const override
 get the full name of this specific type More...
 
VariantPtr getSecondAcceptedType () const
 
std::string getShortName () const override
 get a short name of this specific type More...
 
VariantPtr navigateAbsolute (const Path &path) const override
 naviate absolute More...
 
 Pair (const Path &path=Path())
 
 Pair (const type::dto::Pair &, const Path &path=Path())
 
void setFirstAcceptedType (const VariantPtr &)
 
void setSecondAcceptedType (const VariantPtr &)
 
type::dto::PairPtr toPairDTO () const
 
- Public Member Functions inherited from ContainerVariant< type::dto::Pair, Pair >
virtual ~ContainerVariant ()=default
 
- Public Member Functions inherited from SpecializedVariantBase< type::dto::Pair, Pair >
type::Maybe getMaybe () const override
 get the maybe type More...
 
VariantPtr navigateRelative (const Path &path) const override
 navigate relative More...
 
 operator type::dto::Pair ()
 
bool operator== (const Pair &other) const
 
bool operator== (const Variant &other) const override
 
void setMaybe (const type::Maybe m) override
 set the maybetype of this type More...
 
 SpecializedVariantBase (const type::Descriptor &descriptor, const Path &path)
 
 SpecializedVariantBase (const type::dto::Pair &o, const type::Descriptor &descriptor, const Path &path)
 
type::dto::GenericTypePtr toAronDTO () const override
 convert this variant to a dto object. More...
 
virtual ~SpecializedVariantBase ()=default
 
- Public Member Functions inherited from Variant
type::Descriptor getDescriptor () const
 
virtual type::Maybe getMaybe () const =0
 get the maybe type More...
 
Path getPath () const
 
bool operator== (const VariantPtr &other) const
 
std::string pathToString () const
 
virtual type::dto::GenericTypePtr toAronDTO () const =0
 convert this variant to a dto object. More...
 
 Variant (const type::Descriptor &descriptor, const Path &path=Path())
 
virtual ~Variant ()=default
 

Static Public Member Functions

static std::string GetFullNamePrefix ()
 
static std::string GetNamePrefix ()
 
- Static Public Member Functions inherited from SpecializedVariantBase< type::dto::Pair, Pair >
static const PairDynamicCast (const Variant &n)
 
static std::shared_ptr< PairDynamicCast (const VariantPtr &n)
 
static PairDynamicCast (Variant &n)
 
static std::shared_ptr< PairDynamicCastAndCheck (const VariantPtr &n)
 
- Static Public Member Functions inherited from Variant
static VariantPtr FromAronDTO (const type::dto::GenericType &, const Path &=Path())
 create a variant object from an dto object More...
 

Additional Inherited Members

- Public Types inherited from Variant
using PointerType = VariantPtr
 
- Protected Attributes inherited from SpecializedVariantBase< type::dto::Pair, Pair >
type::dto::Pair ::PointerType aron
 
- Protected Attributes inherited from Variant
const type::Descriptor descriptor
 
const Path path
 

Detailed Description

The Pair class.

It represents the pair type A pair has two accepted types

Definition at line 39 of file Pair.h.

Constructor & Destructor Documentation

◆ Pair() [1/2]

Pair ( const Path path = Path())

Definition at line 30 of file Pair.cpp.

◆ Pair() [2/2]

Pair ( const type::dto::Pair &  o,
const Path path = Path() 
)

Definition at line 35 of file Pair.cpp.

Member Function Documentation

◆ addAcceptedType()

void addAcceptedType ( const VariantPtr n)

Definition at line 62 of file Pair.cpp.

+ Here is the call graph for this function:

◆ childrenSize()

size_t childrenSize ( ) const
overridevirtual

Implements Variant.

Definition at line 107 of file Pair.cpp.

◆ getAcceptedTypes()

std::pair< VariantPtr, VariantPtr > getAcceptedTypes ( ) const

Definition at line 44 of file Pair.cpp.

+ Here is the caller graph for this function:

◆ getChildren()

std::vector< VariantPtr > getChildren ( ) const
overridevirtual

get all child elements

Implements Variant.

Definition at line 101 of file Pair.cpp.

◆ getFirstAcceptedType()

VariantPtr getFirstAcceptedType ( ) const

Definition at line 50 of file Pair.cpp.

+ Here is the caller graph for this function:

◆ getFullName()

std::string getFullName ( ) const
overridevirtual

get the full name of this specific type

Implements Variant.

Definition at line 119 of file Pair.cpp.

◆ GetFullNamePrefix()

std::string GetFullNamePrefix ( )
static

Definition at line 126 of file Pair.cpp.

◆ GetNamePrefix()

std::string GetNamePrefix ( )
static

Definition at line 132 of file Pair.cpp.

◆ getSecondAcceptedType()

VariantPtr getSecondAcceptedType ( ) const

Definition at line 56 of file Pair.cpp.

+ Here is the caller graph for this function:

◆ getShortName()

std::string getShortName ( ) const
overridevirtual

get a short name of this specific type

Implements Variant.

Definition at line 113 of file Pair.cpp.

◆ navigateAbsolute()

VariantPtr navigateAbsolute ( const Path path) const
overridevirtual

naviate absolute

Implements Variant.

Definition at line 138 of file Pair.cpp.

+ Here is the call graph for this function:

◆ setFirstAcceptedType()

void setFirstAcceptedType ( const VariantPtr n)

Definition at line 80 of file Pair.cpp.

◆ setSecondAcceptedType()

void setSecondAcceptedType ( const VariantPtr n)

Definition at line 87 of file Pair.cpp.

◆ toPairDTO()

type::dto::PairPtr toPairDTO ( ) const

Definition at line 94 of file Pair.cpp.


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