Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Concepts
Public Member Functions
object::AnyObject< T > Class Template Reference

Represents an adaptor of any type to a class in type hierarchy of objects in the algorithms library. More...

#include <AnyObject.h>

Inheritance diagram for object::AnyObject< T >:
[legend]
Collaboration diagram for object::AnyObject< T >:
[legend]

Public Member Functions

 AnyObject (T, unsigned id=0)
 Constructor of the class based on the value of the wrapped object. More...
 
AnyObjectBaseclone () const &override
 Virtual copy constructor. ( ) const & More...
 
AnyObjectBaseclone () &&override
 Virtual copy constructor. ( ) && More...
 
std::strong_ordering operator<=> (const AnyObjectBase &other) const override
 <=> ( const AnyObjectBase & ) const More...
 
std::strong_ordering operator<=> (const AnyObject< T > &other) const
 
bool operator== (const AnyObjectBase &other) const override
 == ( const AnyObjectBase & ) const More...
 
bool operator== (const AnyObject &other) const
 
void operator>> (ext::ostream &out) const override
 >> ( ext::ostream & ) const More...
 
 operator std::string () const override
 std::string ( ) const More...
 
void increment (unsigned by) override
 Increments the unique counter of the object. ( ) const More...
 
const T & getData () const
 
unsigned getId () const override
 ( ) const More...
 
- Public Member Functions inherited from object::AnyObjectBase
 AnyObjectBase ()=default
 Default constructor. Needed because some constructor is specified. More...
 
 AnyObjectBase (AnyObjectBase &&) noexcept=default
 Default move constructor. Needed because of default destructor. More...
 
 AnyObjectBase (const AnyObjectBase &)=default
 Default copy constructor. More...
 
AnyObjectBaseoperator= (AnyObjectBase &&) noexcept=default
 Default move operator =. Needed because of default destructor. More...
 
AnyObjectBaseoperator= (const AnyObjectBase &)=default
 Default copy operator =. More...
 
virtual ~AnyObjectBase () noexcept=default
 To allow destruction in type hierarchy. More...
 

Detailed Description

template<class T>
class object::AnyObject< T >

Represents an adaptor of any type to a class in type hierarchy of objects in the algorithms library.

Template Parameters
Tthe type of the wrapped object.

Constructor & Destructor Documentation

◆ AnyObject()

template<class T >
object::AnyObject< T >::AnyObject ( data,
unsigned  id = 0 
)
explicit

Constructor of the class based on the value of the wrapped object.

Parameters
datathe object to be wrapped

Member Function Documentation

◆ clone() [1/2]

template<class T >
AnyObjectBase * object::AnyObject< T >::clone ( ) &&
overridevirtual

Virtual copy constructor. ( ) &&

Returns
dynamically allocated copy constructed instance ( ) &&

Implements object::AnyObjectBase.

◆ clone() [2/2]

template<class T >
AnyObjectBase * object::AnyObject< T >::clone ( ) const &
overridevirtual

Virtual copy constructor. ( ) const &

Returns
dynamically allocated copy constructed instance ( ) const &

Implements object::AnyObjectBase.

◆ getData()

template<class T >
const T & object::AnyObject< T >::getData

Getter of the wrapped object

Returns
reference to the wrapped object.
Here is the caller graph for this function:

◆ getId()

template<class T >
unsigned object::AnyObject< T >::getId ( ) const
inlineoverridevirtual

( ) const

Getter of unique identifier

Returns
the unique identifier ( ) const

Implements object::AnyObjectBase.

◆ increment()

template<class T >
void object::AnyObject< T >::increment ( unsigned  by)
inlineoverridevirtual

Increments the unique counter of the object. ( ) const

Parameters
byhow much to increment ( ) const

Implements object::AnyObjectBase.

◆ operator std::string()

template<class T >
object::AnyObject< T >::operator std::string
explicitoverridevirtual

std::string ( ) const

std::string ( ) const

Implements object::AnyObjectBase.

Here is the call graph for this function:

◆ operator<=>() [1/2]

template<class T >
std::strong_ordering object::AnyObject< T >::operator<=> ( const AnyObject< T > &  other) const
inline

The actual three way comparison implementation

Parameters
otherthe other instance
Returns
the actual relation between two by type same containers
Here is the call graph for this function:

◆ operator<=>() [2/2]

template<class T >
std::strong_ordering object::AnyObject< T >::operator<=> ( const AnyObjectBase other) const
inlineoverridevirtual

<=> ( const AnyObjectBase & ) const

<=> ( const AnyObjectBase & ) const

Implements object::AnyObjectBase.

◆ operator==() [1/2]

template<class T >
bool object::AnyObject< T >::operator== ( const AnyObject< T > &  other) const
inline

The actual equality comparsion implemention

Parameters
otherthe other instance
Returns
the actual relation between two by type same containers
Here is the call graph for this function:

◆ operator==() [2/2]

template<class T >
bool object::AnyObject< T >::operator== ( const AnyObjectBase other) const
inlineoverridevirtual

== ( const AnyObjectBase & ) const

== ( const AnyObjectBase & ) const

Implements object::AnyObjectBase.

◆ operator>>()

template<class T >
void object::AnyObject< T >::operator>> ( ext::ostream out) const
overridevirtual

>> ( ext::ostream & ) const

>> ( ext::ostream & ) const

Implements object::AnyObjectBase.


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