Image Component Library (ICL)
|
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. | |
template<class T > | |
T | as () const throw (UnassignableTypesException) |
Trys to convert a Data element into a (by template parameter) given type. | |
template<class T > | |
operator T () const throw (UnassignableTypesException) | |
implicit conversion into l-value type (little dangerous) | |
const std::string & | getTypeID () const |
returns the internal type ID (obtained by C++'s RTTI) | |
void | render () throw (UnassignableTypesException) |
void | link (void *data) throw (UnassignableTypesException) |
links DrawWidget3D and GLCallback | |
void | install (void *data) |
data must be of type MouseHandler* | |
ICLQt_API void | install (utils::Function< void, const MouseEvent & > f) |
installs a function directly | |
void | registerCallback (const utils::Function< void > &cb) |
register simple callback type | |
void | registerCallback (const utils::Function< void, const std::string & > &cb) |
register simple callback type | |
void | enable () |
possible for all handle-types | |
void | disable () |
possible for all handle types | |
Private Member Functions | |
Data (DataArray *data) | |
Constructor (private->only the parent DataStore is allowed to contruct Data's) | |
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. | |
Private Attributes | |
DataArray * | data |
internally reference DataStore entry | |
Friends | |
class | DataStore |
Arbitrary Data encapsulation type.
icl::qt::DataStore::Data::Data | ( | DataArray * | data | ) | [inline, private] |
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) [static, private] |
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
icl::qt::DataStore::Data::operator T | ( | ) | const throw (UnassignableTypesException) [inline] |
implicit conversion into l-value type (little dangerous)
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
friend class DataStore [friend] |
DataArray* icl::qt::DataStore::Data::data [private] |
internally reference DataStore entry