#include <mainmodule.h>
Public Types | |
| typedef TDESharedPtr< MainModule > | Ptr |
| Public Types inherited from Kross::Api::Module | |
| typedef TDESharedPtr< Module > | Ptr |
| Public Types inherited from Kross::Api::Class< Module > | |
| typedef TDESharedPtr< Module > | 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 | |
| MainModule (const TQString &name) | |
| virtual | ~MainModule () |
| virtual const TQString | getClassName () const |
| bool | hadException () |
| Exception::Ptr | getException () |
| void | setException (Exception::Ptr exception) |
| EventSignal::Ptr | addSignal (const TQString &name, TQObject *sender, TQCString signal) |
| EventSlot::Ptr | addSlot (const TQString &name, TQObject *receiver, TQCString slot) |
| QtObject::Ptr | addTQObject (TQObject *object, const TQString &name=TQString()) |
| EventAction::Ptr | addTDEAction (TDEAction *action, const TQString &name=TQString()) |
| Public Member Functions inherited from Kross::Api::Module | |
| Module (const TQString &name) | |
| virtual | ~Module () |
| virtual Kross::Api::Object::Ptr | get (const TQString &, void *=0) |
| Public Member Functions inherited from Kross::Api::Class< Module > | |
| Class (const TQString &name) | |
| virtual | ~Class () |
| operator Module * () | |
| Public Member Functions inherited from Kross::Api::Event< Module > | |
| Event (const TQString &name) | |
| virtual | ~Event () |
| void | addFunction (const TQString &name, FunctionPtr 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 Object::Ptr | call (const TQString &name, TDESharedPtr< List > arguments) |
| virtual TQStringList | getCalls () |
Additional Inherited Members | |
| Static Public Member Functions inherited from Kross::Api::Class< Module > | |
| static Object::Ptr | toObject (TYPE t) |
| 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
This class implements Module for the global Manager singleton and local ScriptContainer instances.
The MainModule class provides base functionality for a root node in a tree of Kross::Api::Object instances.
Definition at line 53 of file mainmodule.h.
Member Typedef Documentation
◆ Ptr
| typedef TDESharedPtr<MainModule> Kross::Api::MainModule::Ptr |
Shared pointer to implement reference-counting.
Definition at line 58 of file mainmodule.h.
Constructor & Destructor Documentation
◆ MainModule()
|
explicit |
Constructor.
- Parameters
-
name the name of the Module . While the global manager module has the name "Kross" the ScriptContainer instances are accessible by there ScriptContainer::getName() name.
Definition at line 39 of file mainmodule.cpp.
◆ ~MainModule()
|
virtual |
Destructor.
Definition at line 46 of file mainmodule.cpp.
Member Function Documentation
◆ addSignal()
| EventSignal::Ptr MainModule::addSignal | ( | const TQString & | name, |
| TQObject * | sender, | ||
| TQCString | signal ) |
Add a TQt signal to the Module by creating an EventSignal for it.
- Parameters
-
name the name the EventSignal is reachable as sender the TQObject instance which is the sender of the signalsignal the TQt signal macro the senderemits to call the EventSignal
- Returns
- the newly added EventSignal instance which is now a child of this MainModule
Definition at line 78 of file mainmodule.cpp.
◆ addSlot()
| EventSlot::Ptr MainModule::addSlot | ( | const TQString & | name, |
| TQObject * | receiver, | ||
| TQCString | slot ) |
Add a TQt slot to the Module by creating an EventSlot for it.
- Parameters
-
name the name the EventSlot is reachable as receiver the TQObject instance which is the receiver of the signalslot the TQt slot macro of the receiverto invoke if the EventSlot got called.
- Returns
- the newly added EventSlot instance which is now a child of this MainModule
Definition at line 88 of file mainmodule.cpp.
◆ addTDEAction()
| EventAction::Ptr MainModule::addTDEAction | ( | TDEAction * | action, |
| const TQString & | name = TQString() ) |
Add a TDEAction to the eventcollection.
The TDEAction will be wrapped by a EventAction and will be added to this collection.
- Parameters
-
name name to identify the action by action the TDEAction instance that should be added to this MainModule
- Returns
- the newly added EventAction instance which is now a child of this MainModule
- Todo
- check name dox.
Definition at line 108 of file mainmodule.cpp.
◆ addTQObject()
| QtObject::Ptr MainModule::addTQObject | ( | TQObject * | object, |
| const TQString & | name = TQString() ) |
Add a TQObject to the eventcollection.
All signals and slots the TQObject has will be added to a new EventCollection instance which is child of this EventCollection instance.
- Parameters
-
object the TQObject instance that should be added to this MainModule name the name under which this TQObject instance should be registered as
- Returns
- the newly added QtObject instance which is now a child of this MainModule
Definition at line 98 of file mainmodule.cpp.
◆ getClassName()
|
virtual |
Reimplemented from Kross::Api::Callable.
Definition at line 51 of file mainmodule.cpp.
◆ getException()
| Exception::Ptr MainModule::getException | ( | ) |
- Returns
- the Exception this module throwed.
Definition at line 61 of file mainmodule.cpp.
◆ hadException()
| bool MainModule::hadException | ( | ) |
- Returns
- true if the script throwed an exception else false.
Definition at line 56 of file mainmodule.cpp.
◆ setException()
| void MainModule::setException | ( | Exception::Ptr | exception | ) |
Set the Exception this module throwed.
- Parameters
-
exception The Exception this module throws or NULL if you like to clear exception and to let hadException() return false.
Definition at line 66 of file mainmodule.cpp.
The documentation for this class was generated from the following files:
