Kross::Api::Event< T > Class Template Reference
#include <event.h>
Inheritance diagram for Kross::Api::Event< T >:
Public Member Functions | |
| Event (const TQString &name) | |
| virtual | ~Event () |
| void | addFunction (const TQString &name, FunctionPtr function) |
| void | addFunction (const TQString &name, Function *function) |
| template<class RETURNOBJ , class ARG1OBJ , class ARG2OBJ , class ARG3OBJ , class ARG4OBJ , class INSTANCE , typename METHOD > | |
| void | addFunction4 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0, ARG2OBJ *arg2=0, ARG3OBJ *arg3=0, ARG4OBJ *arg4=0) |
| template<class RETURNOBJ , class ARG1OBJ , class ARG2OBJ , class ARG3OBJ , class INSTANCE , typename METHOD > | |
| void | addFunction3 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0, ARG2OBJ *arg2=0, ARG3OBJ *arg3=0) |
| template<class RETURNOBJ , class ARG1OBJ , class ARG2OBJ , class INSTANCE , typename METHOD > | |
| void | addFunction2 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0, ARG2OBJ *arg2=0) |
| template<class RETURNOBJ , class ARG1OBJ , class INSTANCE , typename METHOD > | |
| void | addFunction1 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0) |
| template<class RETURNOBJ , class INSTANCE , typename METHOD > | |
| void | addFunction0 (const TQString &name, INSTANCE *instance, METHOD method) |
| bool | isAFunction (const TQString &name) const |
| virtual Object::Ptr | call (const TQString &name, List::Ptr arguments) |
Public Member Functions inherited from Kross::Api::Callable | |
| Callable (const TQString &name) | |
| virtual | ~Callable () |
| const TQString | getName () const |
| virtual const TQString | getClassName () const |
| bool | hasChild (const TQString &name) const |
| Object::Ptr | getChild (const TQString &name) const |
| TQMap< TQString, Object::Ptr > | getChildren () const |
| bool | addChild (const TQString &name, Object *object) |
| bool | addChild (Callable *object) |
| void | removeChild (const TQString &name) |
| void | removeAllChildren () |
Public Member Functions inherited from Kross::Api::Object | |
| Object () | |
| virtual | ~Object () |
| virtual const TQString | toString () |
| virtual Object::Ptr | call (const TQString &name, TDESharedPtr< List > arguments) |
| virtual TQStringList | getCalls () |
Additional Inherited Members | |
Public Types inherited from Kross::Api::Callable | |
| typedef TDESharedPtr< Callable > | Ptr |
Public Types inherited from Kross::Api::Object | |
| typedef TDESharedPtr< Object > | Ptr |
Static Public Member Functions inherited from Kross::Api::Object | |
| template<class T > | |
| static T * | fromObject (Object::Ptr object) |
| template<typename TYPE > | |
| static Object::Ptr | toObject (TYPE t) |
Detailed Description
template<class T>
class Kross::Api::Event< T >
class Kross::Api::Event< T >
Template class for all kinds of callable events.
An event is the abstract base for callable objects like methodfunctions in Class instances or EventSlot and EventSignal to access TQt signals and slots.
Constructor & Destructor Documentation
◆ Event()
template<class T >
|
inline |
◆ ~Event()
template<class T >
|
inlinevirtual |
Member Function Documentation
◆ addFunction() [1/2]
template<class T >
|
inline |
Add a methodfunction to the list of functions this Object supports.
◆ addFunction() [2/2]
template<class T >
|
inline |
Add a Callable methodfunction to the list of functions this Object supports.
The FunctionPtr points to the concret Object::Ptr myfuncname(List::Ptr) method in the class defined with template T.
- Parameters
-
name The functionname. Each function this object holds should have an unique name to be still accessable. function A pointer to the methodfunction that should handle calls.
- Todo:
- Remove this method as soon as there is no code using it
◆ addFunction0()
template<class T >
template<class RETURNOBJ , class INSTANCE , typename METHOD >
|
inline |
◆ addFunction1()
template<class T >
template<class RETURNOBJ , class ARG1OBJ , class INSTANCE , typename METHOD >
|
inline |
◆ addFunction2()
template<class T >
template<class RETURNOBJ , class ARG1OBJ , class ARG2OBJ , class INSTANCE , typename METHOD >
|
inline |
◆ addFunction3()
template<class T >
template<class RETURNOBJ , class ARG1OBJ , class ARG2OBJ , class ARG3OBJ , class INSTANCE , typename METHOD >
|
inline |
◆ addFunction4()
template<class T >
template<class RETURNOBJ , class ARG1OBJ , class ARG2OBJ , class ARG3OBJ , class ARG4OBJ , class INSTANCE , typename METHOD >
|
inline |
Template function to add a ProxyFunction as builtin-function to this Event instance.
◆ call()
template<class T >
|
inlinevirtual |
Overloaded method to handle function-calls.
- Exceptions
-
AttributeException if argumentparameters arn't valid. RuntimeException if the functionname isn't valid.
- Parameters
-
name The functionname. Each function this Object holds should have a different name cause they are access by they name. If name is TQString() or empty, a self-reference to this instance is returned. arguments The list of arguments.
- Returns
- An Object representing the call result or NULL if there doesn't exists such a function with defined name.
Reimplemented from Kross::Api::Callable.
◆ isAFunction()
template<class T >
|
inline |
The documentation for this class was generated from the following file:

Public Member Functions inherited from