Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions | Friends
object::Object Class Reference

#include <Object.h>

Public Member Functions

 Object (const char *string)
 Specialisation of the make method for c-strings. More...
 
template<class Type >
requires ( ! std::is_same_v < std::decay_t < Type >, Object > )
 Object (Type &&data)
 Specialisation of the make method for objects that are not from the object hierarchy of Algorithms library. More...
 
template<class ... Types>
 Object (ext::variant< Types ... > &&data)
 Specialisation of the make method for variants. More...
 
template<class ... Types>
 Object (const ext::variant< Types ... > &data)
 Specialisation of the make method for variants. More...
 
template<class Type >
 Object (const AnyObject< Type > &data)
 
template<class Type >
 Object (AnyObject< Type > &data)
 
template<class Type >
 Object (AnyObject< Type > &&data)
 
 Object (const AnyObject< object::Object > &data)
 
 Object (AnyObject< object::Object > &&data)
 
const AnyObjectBasegetData () const
 
AnyObjectBasegetData ()
 
void setData (const AnyObjectBase &data)
 
void setData (AnyObjectBase &&data)
 
std::strong_ordering operator<=> (const Object &other) const
 
bool operator== (const Object &other) const
 
 operator std::string () const
 
Objectoperator++ ()
 Increments the unique counter of the object by one. Prefix version. More...
 
Object operator++ (int)
 Increments the unique counter of the object by one. Postfix version. More...
 
Object operator+= (unsigned by)
 Increments the unique counter of the object. More...
 
unsigned getId () const
 

Friends

ext::ostreamoperator<< (ext::ostream &os, const Object &instance)
 

Detailed Description

Wrapper around object.

Constructor & Destructor Documentation

◆ Object() [1/9]

object::Object::Object ( const char *  string)
inlineexplicit

Specialisation of the make method for c-strings.

◆ Object() [2/9]

template<class Type >
requires ( ! std::is_same_v < std::decay_t < Type >, Object > )
object::Object::Object ( Type &&  data)
inlineexplicit

Specialisation of the make method for objects that are not from the object hierarchy of Algorithms library.

◆ Object() [3/9]

template<class ... Types>
object::Object::Object ( ext::variant< Types ... > &&  data)
inlineexplicit

Specialisation of the make method for variants.

The resulting object is not constructed from the variant itself but from the value stored inside. If the value stored inside the variant is variant again, the process is repeated.

◆ Object() [4/9]

template<class ... Types>
object::Object::Object ( const ext::variant< Types ... > &  data)
inlineexplicit

Specialisation of the make method for variants.

The resulting object is not constructed from the variant itself but from the value stored inside. If the value stored inside the variant is variant again, the process is repeated.

◆ Object() [5/9]

template<class Type >
object::Object::Object ( const AnyObject< Type > &  data)
inlineexplicit

Constructor that wraps an object given by a constant reference. Uses clone of the parameter internally.

◆ Object() [6/9]

template<class Type >
object::Object::Object ( AnyObject< Type > &  data)
inlineexplicit

Constructor that wraps an object given by a reference. Uses clone of the parameter internally.

◆ Object() [7/9]

template<class Type >
object::Object::Object ( AnyObject< Type > &&  data)
inlineexplicit

Constructor that wraps an object given by an r-value reference. Uses clone of the parameter internally.

◆ Object() [8/9]

object::Object::Object ( const AnyObject< object::Object > &  data)
inlineexplicit

Constructor that wraps an object given by constant reference. Uses clone of the parameter internally.

◆ Object() [9/9]

object::Object::Object ( AnyObject< object::Object > &&  data)
inlineexplicit

Constructor that wraps an object given by r-value reference. Uses clone of the parameter internally.

Member Function Documentation

◆ getData() [1/2]

AnyObjectBase & object::Object::getData ( )
inline

Gets the wrapped object.

Returns
wrapped object.

◆ getData() [2/2]

const AnyObjectBase & object::Object::getData ( ) const
inline

Gets the wrapped object.

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

◆ getId()

unsigned object::Object::getId ( ) const
inline

Getter of unique identifier

Returns
the unique identifier
Here is the call graph for this function:

◆ operator std::string()

object::Object::operator std::string ( ) const
inlineexplicit

Casts the wrapped object to as compact as possible string representation.

Returns
string representation of the wrapped object

◆ operator++() [1/2]

Object & object::Object::operator++ ( )
inline

Increments the unique counter of the object by one. Prefix version.

Returns
this instance
Here is the call graph for this function:

◆ operator++() [2/2]

Object object::Object::operator++ ( int  )
inline

Increments the unique counter of the object by one. Postfix version.

Returns
this instance

◆ operator+=()

Object object::Object::operator+= ( unsigned  by)
inline

Increments the unique counter of the object.

Parameters
byhow much to increment
Here is the call graph for this function:

◆ operator<=>()

std::strong_ordering object::Object::operator<=> ( const Object other) const
inline

The three way comparison implementation

Parameters
otherthe other object to compare with.
Returns
the strong ordering between this object and the other.
Here is the call graph for this function:

◆ operator==()

bool object::Object::operator== ( const Object other) const
inline

The equality comparison implementation.

Parameters
otherthe other object to compare with.
Returns
true if this and other objects are equal, false othervise
Here is the call graph for this function:

◆ setData() [1/2]

void object::Object::setData ( AnyObjectBase &&  data)
inline

Sets the wrapped object from r-value reference. Uses clone of the parameter internally.

Here is the call graph for this function:

◆ setData() [2/2]

void object::Object::setData ( const AnyObjectBase data)
inline

Sets the wrapped object from constant reference. Uses clone of the parameter internally.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

ext::ostream & operator<< ( ext::ostream os,
const Object instance 
)
friend

Print the wrapped object as raw representation to ostream.

Parameters
osostream where to print
instancewrapper to print
Returns
modified output stream

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