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)
 Trys to assign an instance of T to this Data-Element. More...
 
template<class T >
as () const
 Trys to convert a Data element into a (by template parameter) given type. More...
 
template<class T >
 operator T () const
 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 ()
 
void link (void *data)
 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)
 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

◆ Data()

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

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

Member Function Documentation

◆ as()

template<class T >
T icl::qt::DataStore::Data::as ( ) const
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

◆ assign()

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

This is the mighty and magic conversion function.

◆ disable()

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

possible for all handle types

◆ enable()

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

possible for all handle-types

◆ getTypeID()

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

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

◆ install() [1/2]

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

data must be of type MouseHandler*

◆ install() [2/2]

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

installs a function directly

◆ link()

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

links DrawWidget3D and GLCallback

◆ operator T()

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

implicit conversion into l-value type (little dangerous)

◆ operator=()

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

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

This will only work, if the data types are assignable

◆ registerCallback() [1/2]

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

register simple callback type

◆ registerCallback() [2/2]

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

register simple callback type

◆ render()

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

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

Friends And Related Function Documentation

◆ DataStore

friend class DataStore
friend

Member Data Documentation

◆ data

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

internally reference DataStore entry


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