Kross::Api::EventScript Class Reference

#include <eventscript.h>

Inheritance diagram for Kross::Api::EventScript:
Kross::Api::Event< EventScript > Kross::Api::Callable Kross::Api::Object

Public Types

typedef TDESharedPtr< EventScript > Ptr
 
- Public Types inherited from Kross::Api::Callable
typedef TDESharedPtr< Callable > Ptr
 
- Public Types inherited from Kross::Api::Object
typedef TDESharedPtr< Object > Ptr
 

Public Member Functions

 EventScript (const TQString &name)
 
virtual ~EventScript ()
 
virtual const TQString getClassName () const
 
virtual Object::Ptr call (const TQString &name, TDESharedPtr< List > arguments)
 
- Public Member Functions inherited from Kross::Api::Event< EventScript >
 Event (const TQString &name)
 
virtual ~Event ()
 
void addFunction (const TQString &name, FunctionPtr function)
 
void addFunction (const TQString &name, Function *function)
 
void addFunction4 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0, ARG2OBJ *arg2=0, ARG3OBJ *arg3=0, ARG4OBJ *arg4=0)
 
void addFunction3 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0, ARG2OBJ *arg2=0, ARG3OBJ *arg3=0)
 
void addFunction2 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0, ARG2OBJ *arg2=0)
 
void addFunction1 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0)
 
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
 
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 TQStringList getCalls ()
 

Additional Inherited Members

- 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

Todo:
implement EventScript ?!

Definition at line 33 of file eventscript.h.

Member Typedef Documentation

◆ Ptr

Shared pointer to implement reference-counting.

Definition at line 41 of file eventscript.h.

Constructor & Destructor Documentation

◆ EventScript()

EventScript::EventScript ( const TQString &  name)

Constructor.

Definition at line 27 of file eventscript.cpp.

◆ ~EventScript()

EventScript::~EventScript ( )
virtual

Destructor.

Definition at line 32 of file eventscript.cpp.

Member Function Documentation

◆ call()

Object::Ptr EventScript::call ( const TQString &  name,
TDESharedPtr< List >  arguments 
)
virtual

Pass a call to the object and evaluated it recursive down the object-hierachy.

Objects like Class are able to handle call's by just implementing this function. If the call is done the called() method will be executed recursive from bottom up the call hierachy.

Exceptions
TypeExceptionif the object or the name is not callable.
Parameters
nameEach call has a name that says what should be called. In the case of a Class the name is the functionname.
argumentsThe list of arguments passed to the call.
Returns
The call-result as Object::Ptr instance or NULL if the call has no result.

Reimplemented from Kross::Api::Object.

Definition at line 41 of file eventscript.cpp.

◆ getClassName()

const TQString EventScript::getClassName ( ) const
virtual

Return the class name.

This could be something like "Kross::Api::Callable" for this object. The value is mainly used for display purposes.

Returns
The name of this class.

Reimplemented from Kross::Api::Callable.

Definition at line 36 of file eventscript.cpp.


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