libqi-api  2.4.3.28
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
qi::DefaultTypeImpl< T, _Access > Class Template Reference

#include <typeimpl.hxx>

Public Types

typedef DefaultTypeImplMethods
< T, _Access > 
MethodsImpl
 

Public Member Functions

virtual const ::qi::TypeInfo & info ()
 Get the TypeInfo corresponding to this type. More...
 
virtual void * initializeStorage (void *ptr=0)
 
virtual void * ptrFromStorage (void **s)
 
virtual bool less (void *a, void *b)
 
virtual void * clone (void *ptr)
 Allocate a storage and copy the value given as an argument. More...
 
virtual void destroy (void *ptr)
 Free all resources of a storage. More...
 
- Public Member Functions inherited from qi::TypeInterface
virtual TypeKind kind ()
 
const char * infoString ()
 
qi::Signature signature (void *storage=0, bool resolveDynamic=false)
 

Additional Inherited Members

- Static Public Member Functions inherited from qi::TypeInterface
static TypeInterface * fromSignature (const qi::Signature &sig)
 

Detailed Description

template<typename T, typename _Access = TypeByPointer<T>>
class qi::DefaultTypeImpl< T, _Access >

Definition at line 289 of file typeimpl.hxx.

Member Typedef Documentation

template<typename T, typename _Access = TypeByPointer<T>>
typedef DefaultTypeImplMethods<T, _Access> qi::DefaultTypeImpl< T, _Access >::MethodsImpl

Definition at line 293 of file typeimpl.hxx.

Member Function Documentation

template<typename T, typename _Access = TypeByPointer<T>>
virtual void* qi::DefaultTypeImpl< T, _Access >::clone ( void *  )
inlinevirtual

Allocate a storage and copy the value given as an argument.

Implements qi::TypeInterface.

Definition at line 294 of file typeimpl.hxx.

template<typename T, typename _Access = TypeByPointer<T>>
virtual void qi::DefaultTypeImpl< T, _Access >::destroy ( void *  )
inlinevirtual

Free all resources of a storage.

Implements qi::TypeInterface.

Definition at line 294 of file typeimpl.hxx.

template<typename T, typename _Access = TypeByPointer<T>>
virtual const ::qi::TypeInfo& qi::DefaultTypeImpl< T, _Access >::info ( )
inlinevirtual

Get the TypeInfo corresponding to this type.

Implements qi::TypeInterface.

Definition at line 294 of file typeimpl.hxx.

template<typename T, typename _Access = TypeByPointer<T>>
virtual void* qi::DefaultTypeImpl< T, _Access >::initializeStorage ( void *  ptr = 0)
inlinevirtual

Initialize and return a new storage, from nothing or a T*.

If ptr is not null, it should be used as a storage (the method can usually just return ptr in that case).

Implements qi::TypeInterface.

Definition at line 294 of file typeimpl.hxx.

template<typename T, typename _Access = TypeByPointer<T>>
virtual bool qi::DefaultTypeImpl< T, _Access >::less ( void *  a,
void *  b 
)
inlinevirtual

Return true if a is less than b

Less must always work: compare pointers if you have to.

Implements qi::TypeInterface.

Definition at line 294 of file typeimpl.hxx.

template<typename T, typename _Access = TypeByPointer<T>>
virtual void* qi::DefaultTypeImpl< T, _Access >::ptrFromStorage ( void **  )
inlinevirtual

Get pointer to type from pointer to storage.

This allows for storing an integer value (for instance) directily into the pointer and avoid an allocation.

This method should be called on storage before casting it to a specific type.

Implements qi::TypeInterface.

Definition at line 294 of file typeimpl.hxx.


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