KSModule Class Reference
An instance of this class represents a loaded module. More...
#include <koscript_context.h>
Collaboration diagram for KSModule:

Public Types | |
typedef KSSharedPtr< KSModule > | Ptr |
Public Member Functions | |
KSModule (KSInterpreter *, const QString &name, KSParseNode *=0) | |
virtual bool | eval (KSContext &) |
virtual KSValue::Ptr | member (KSContext &, const QString &name) |
virtual bool | setMember (KSContext &, const QString &name, const KSValue::Ptr &v) |
virtual bool | isPebbles () const |
QString | name () const |
KSNamespace * | nameSpace () |
KSValue * | object (const QString &name) |
void | addObject (const QString &name, const KSValue::Ptr &v) |
void | removeObject (const QString &name) |
KSInterpreter * | interpreter () |
Protected Member Functions | |
void | setCode (KSParseNode *node) |
Detailed Description
An instance of this class represents a loaded module.It holds the namespace with all symbols of the module and owns the parse tree. A module itself may be inserted in other namespaces.
Definition at line 43 of file koscript_context.h.
Member Function Documentation
|
Executes the code of the module. This method is usually called after the module has been loaded. Definition at line 273 of file koscript_context.cc. |
|
If KSContext::leftExpr returns TRUE for the given context, then a new member is added to the object if it did not exist. Otherwise 0 is returned for a non existing member. This function may nevertheless set an exception if a member is known but if it could not be read for some reason. Definition at line 242 of file koscript_context.cc. |
|
May set an exception if the member could not be set.
Definition at line 266 of file koscript_context.cc. |
|
Reimplemented by KSPebblesModule.
Definition at line 73 of file koscript_context.h. |
|
Definition at line 78 of file koscript_context.h. |
|
Definition at line 115 of file koscript_context.h. |
The documentation for this class was generated from the following files: