Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::common::AnyWrapper< T > Class Template Reference
Inheritance diagram for tesseract::common::AnyWrapper< T >:

Public Member Functions

 AnyWrapper (const T &value_)
 AnyWrapper (T &&value_)
std::type_index getType () const override final
 Get the type index of the object stored.
std::unique_ptr< AnyInterface > clone () const override final
 Make a deep copy of the object.
bool equals (const AnyInterface &other) const override final
 Check if two objects are equal.
Public Member Functions inherited from tesseract::common::AnyInterface
bool operator== (const AnyInterface &rhs) const
bool operator!= (const AnyInterface &rhs) const

Public Attributes

T value {}

Friends

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

Member Function Documentation

◆ getType()

template<typename T>
std::type_index tesseract::common::AnyWrapper< T >::getType ( ) const
inlinefinaloverridevirtual

Get the type index of the object stored.

Returns
The type index

Reimplemented from tesseract::common::AnyInterface.

◆ clone()

template<typename T>
std::unique_ptr< AnyInterface > tesseract::common::AnyWrapper< T >::clone ( ) const
inlinefinaloverridevirtual

Make a deep copy of the object.

Returns
A deep copy

Implements tesseract::common::AnyInterface.

◆ equals()

template<typename T>
bool tesseract::common::AnyWrapper< T >::equals ( const AnyInterface & other) const
inlinefinaloverridevirtual

Check if two objects are equal.

Parameters
otherThe other object to compare with
Returns
True if equal, otherwise false

Implements tesseract::common::AnyInterface.