Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
Tuple1< T, A > Class Template Reference

#include <elm/rtti/Tuple.h>

+ Inheritance diagram for Tuple1< T, A >:

Public Types

typedef A(T::* acc_t) () const
 
- Public Types inherited from Type
typedef HashMap< string, const Type * >::Iter TypeIter
 

Public Member Functions

 Tuple1 (cstring name, acc_t acc)
 
void split (void *ptr, Vector< Variant > &values) const override
 
voidmake (const Vector< Variant > &values, int i) const override
 
- Public Member Functions inherited from AbstractTuple< T >
 AbstractTuple (cstring name)
 
voidinstantiate (void) const override
 
void free (void *obj) const override
 
const TupletoTuple () const override
 
const Vector< const rtti::Type * > & types () const override
 
- Public Member Functions inherited from AbstractClass
 AbstractClass (CString name, const AbstractClass &base)
 
 AbstractClass (const make &m)
 
 AbstractClass (const make &m, const AbstractClass &base)
 
const AbstractClassbase (void) const
 
bool baseOf (const AbstractClass *clazz)
 
virtual bool isClass (void) const
 
virtual const AbstractClassasClass (void) const
 
virtual voidupCast (void *ptr) const
 
virtual voiddownCast (void *ptr) const
 
voidupCast (void *ptr, const AbstractClass &cls) const
 
voiddownCast (void *ptr, const AbstractClass &cls) const
 
const voidupCast (const void *ptr) const
 
const voiddownCast (const void *ptr) const
 
const voidupCast (const void *ptr, const AbstractClass &cls) const
 
const voiddownCast (const void *ptr, const AbstractClass &cls) const
 
const List< Operation * > & operations (void) const
 
const List< const Type * > params (void) const
 
- Public Member Functions inherited from Type
 Type (string name="")
 
virtual ~Type (void)
 
string name (void) const
 
const PointerTypepointer (void) const
 
virtual bool canCast (const Type *t) const
 
virtual bool isVoid (void) const
 
virtual bool isBool (void) const
 
virtual bool isInt (void) const
 
virtual bool isFloat (void) const
 
virtual bool isPtr (void) const
 
virtual const PointerTypeasPtr (void) const
 
virtual bool isEnum (void) const
 
virtual const EnumerableasEnum (void) const
 
virtual bool isSerial (void) const
 
virtual const SerializableasSerial (void) const
 
virtual const TemplateTypeasTemplate (void) const
 
virtual const InstanceTypeasInstance (void) const
 
virtual const ParamTypeasParam (void) const
 
void initialize (void)
 
bool operator== (const Type &t) const
 
bool operator!= (const Type &t) const
 
- Public Member Functions inherited from Tuple
virtual ~Tuple ()
 
int count () const
 

Additional Inherited Members

- Static Public Member Functions inherited from Type
static const Typeget (string name)
 
static TypeIter types (void)
 
- Static Public Attributes inherited from Type
static const Typeparam0
 
static const Typeparam1
 
static const Typeparam2
 
static const Typeparam3
 
- Protected Member Functions inherited from AbstractTuple< T >
void add (const rtti::Type *t)
 

Member Typedef Documentation

◆ acc_t

typedef A(T::* acc_t() const

Constructor & Destructor Documentation

◆ Tuple1()

Tuple1 ( cstring  name,
acc_t  acc 
)
inline

Member Function Documentation

◆ make()

void* make ( const Vector< Variant > &  values,
int  i 
) const
inlineoverridevirtual

Build a tuple objects from its components. The component order in values arrays must be the same as type as types returned by Tuple::types().

Parameters
valuesValues composing the tuple object.
iIndex to start reading components from.
Returns
Built tuple object.

Implements Tuple.

References elm::cerr, and elm::io::endl.

◆ split()

void split ( void ptr,
Vector< Variant > &  values 
) const
inlineoverridevirtual

Decompose a tuple object in its component. The component order in values arrays must be the same as type as types returned by Tuple::types().

Parameters
ptrObject to decompose.
valuesResult variant vector made of components of the object.

Implements Tuple.

References Vector< T, E, A >::add().


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