Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::common::AnyPoly Class Reference

Public Member Functions

 AnyPoly (const AnyPoly &other)
AnyPoly & operator= (const AnyPoly &other)
 AnyPoly (AnyPoly &&other) noexcept=default
AnyPoly & operator= (AnyPoly &&other) noexcept=default
 AnyPoly (const AnyInterface &impl)
template<typename T, typename std::enable_if_t<!std::is_base_of_v< AnyInterface, T > &&!std::is_same_v< std::decay_t< T >, AnyPoly >, bool > = true>
 AnyPoly (T &&value)
template<typename T, typename std::enable_if_t<!std::is_base_of_v< AnyInterface, T > &&!std::is_same_v< std::decay_t< T >, AnyPoly >, bool > = true>
AnyPoly & operator= (T &&value)
template<typename T, typename std::enable_if_t<!std::is_base_of_v< AnyInterface, T > &&!std::is_same_v< std::decay_t< T >, AnyPoly >, bool > = true>
 AnyPoly (const T &value)
template<typename T, typename std::enable_if_t<!std::is_base_of_v< AnyInterface, T > &&!std::is_same_v< std::decay_t< T >, AnyPoly >, bool > = true>
AnyPoly & operator= (const T &value)
std::type_index getType () const
 Get the stored derived type.
bool isNull () const
 Check if the poly type is null.
AnyInterface & get ()
 Get the instruction being stored.
const AnyInterface & get () const
template<typename T, typename std::enable_if_t< std::is_base_of_v< AnyInterface, T >, bool > = true>
T & as ()
template<typename T, typename std::enable_if_t<!std::is_base_of_v< AnyInterface, T >, bool > = true>
T & as ()
template<typename T, typename std::enable_if_t< std::is_base_of_v< AnyInterface, T >, bool > = true>
const T & as () const
template<typename T, typename std::enable_if_t<!std::is_base_of_v< AnyInterface, T >, bool > = true>
const T & as () const
bool operator== (const AnyPoly &rhs) const
bool operator!= (const AnyPoly &rhs) const

Friends

template<class Archive>
friend void::tesseract::common::serialize (Archive &ar, AnyPoly &obj)

Constructor & Destructor Documentation

◆ AnyPoly() [1/2]

template<typename T, typename std::enable_if_t<!std::is_base_of_v< AnyInterface, T > &&!std::is_same_v< std::decay_t< T >, AnyPoly >, bool > = true>
tesseract::common::AnyPoly::AnyPoly ( T && value)
inline

Template Constructor for Moving Arbitrary Values

◆ AnyPoly() [2/2]

template<typename T, typename std::enable_if_t<!std::is_base_of_v< AnyInterface, T > &&!std::is_same_v< std::decay_t< T >, AnyPoly >, bool > = true>
tesseract::common::AnyPoly::AnyPoly ( const T & value)
inline

Template Constructor for Copying Arbitrary Values

Member Function Documentation

◆ operator=()

template<typename T, typename std::enable_if_t<!std::is_base_of_v< AnyInterface, T > &&!std::is_same_v< std::decay_t< T >, AnyPoly >, bool > = true>
AnyPoly & tesseract::common::AnyPoly::operator= ( const T & value)
inline

Templated Copy Assignment Operator

◆ getType()

std::type_index tesseract::common::AnyPoly::getType ( ) const

Get the stored derived type.

Returns
The derived type index

◆ isNull()

bool tesseract::common::AnyPoly::isNull ( ) const

Check if the poly type is null.

Returns
True if null, otherwise false

◆ get()

AnyInterface & tesseract::common::AnyPoly::get ( )

Get the instruction being stored.

Returns
The instruction
Exceptions
Ifnull