Image Component Library (ICL)
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
icl::qt::DataStore::Data Class Reference

Arbitrary Data encapsulation type. More...

#include <DataStore.h>

Classes

struct  Event
 Internally used Data- Structure. More...
 

Public Member Functions

template<class T >
void operator= (const T &t) throw (UnassignableTypesException)
 Trys to assign an instance of T to this Data-Element. More...
 
template<class T >
as () const throw (UnassignableTypesException)
 Trys to convert a Data element into a (by template parameter) given type. More...
 
template<class T >
 operator T () const throw (UnassignableTypesException)
 implicit conversion into l-value type (little dangerous) More...
 
const std::string & getTypeID () const
 returns the internal type ID (obtained by C++'s RTTI) More...
 
void render () throw (UnassignableTypesException)
 
void link (void *data) throw (UnassignableTypesException)
 links DrawWidget3D and GLCallback More...
 
void install (void *data)
 data must be of type MouseHandler* More...
 
ICLQt_API void install (utils::Function< void, const MouseEvent & > f)
 installs a function directly More...
 
void registerCallback (const utils::Function< void > &cb)
 register simple callback type More...
 
void registerCallback (const utils::Function< void, const std::string & > &cb)
 register simple callback type More...
 
void enable ()
 possible for all handle-types More...
 
void disable ()
 possible for all handle types More...
 

Private Member Functions

 Data (DataArray *data)
 Constructor (private->only the parent DataStore is allowed to contruct Data's) More...
 

Static Private Member Functions

static ICLQt_API void assign (void *src, const std::string &srcType, void *dst, const std::string &dstType) throw (UnassignableTypesException)
 This is the mighty and magic conversion function. More...
 

Private Attributes

DataArraydata
 internally reference DataStore entry More...
 

Friends

class DataStore
 

Detailed Description

Arbitrary Data encapsulation type.

Constructor & Destructor Documentation

icl::qt::DataStore::Data::Data ( DataArray data)
inlineprivate

Constructor (private->only the parent DataStore is allowed to contruct Data's)

Member Function Documentation

template<class T >
T icl::qt::DataStore::Data::as ( ) const
throw (UnassignableTypesException
)
inline

Trys to convert a Data element into a (by template parameter) given type.

this will only work, if the data element is convertable to the desired type. Otherwise an exception is thrown

static ICLQt_API void icl::qt::DataStore::Data::assign ( void *  src,
const std::string &  srcType,
void *  dst,
const std::string &  dstType 
)
throw (UnassignableTypesException
)
staticprivate

This is the mighty and magic conversion function.

void icl::qt::DataStore::Data::disable ( )
inline

possible for all handle types

void icl::qt::DataStore::Data::enable ( )
inline

possible for all handle-types

const std::string& icl::qt::DataStore::Data::getTypeID ( ) const
inline

returns the internal type ID (obtained by C++'s RTTI)

void icl::qt::DataStore::Data::install ( void *  data)
inline

data must be of type MouseHandler*

ICLQt_API void icl::qt::DataStore::Data::install ( utils::Function< void, const MouseEvent & >  f)

installs a function directly

void icl::qt::DataStore::Data::link ( void *  data)
throw (UnassignableTypesException
)
inline

links DrawWidget3D and GLCallback

template<class T >
icl::qt::DataStore::Data::operator T ( ) const
throw (UnassignableTypesException
)
inline

implicit conversion into l-value type (little dangerous)

template<class T >
void icl::qt::DataStore::Data::operator= ( const T &  t)
throw (UnassignableTypesException
)
inline

Trys to assign an instance of T to this Data-Element.

This will only work, if the data types are assignable

void icl::qt::DataStore::Data::registerCallback ( const utils::Function< void > &  cb)
inline

register simple callback type

void icl::qt::DataStore::Data::registerCallback ( const utils::Function< void, const std::string & > &  cb)
inline

register simple callback type

void icl::qt::DataStore::Data::render ( )
throw (UnassignableTypesException
)
inline

Currently supported for Data-types ImageHandle, DrawHandle, FPSHandle and PlotHandle

Friends And Related Function Documentation

friend class DataStore
friend

Member Data Documentation

DataArray* icl::qt::DataStore::Data::data
private

internally reference DataStore entry


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