Runtime methods collection class.
More...
#include <ccscript.h>
|
symbol * | find (const char *id) |
|
void | skip (void) |
|
void | push (void) |
|
bool | trylabel (const char *id) |
|
bool | tryexit (void) |
|
void | pullScope (void) |
|
void | pullBase (void) |
|
void | pullLoop (void) |
|
bool | pop (void) |
|
void | setStack (header *scr, event *ev=NULL) |
|
bool | scriptEvent (const char *name) |
| Try to branch to a named event handler. More...
|
|
event * | scriptMethod (const char *name) |
| Search for an event object in the method table. More...
|
|
char * | getTemp (void) |
|
bool | setConst (const char *id, const char *value) |
|
symbol * | createSymbol (const char *id) |
|
symbol * | getVar (const char *id, const char *value=NULL) |
|
const char * | getValue (void) |
|
const char * | getContent (void) |
|
const char * | getContent (const char *text) |
|
const char * | getKeyword (const char *id) |
|
method_t | getLooping (void) |
|
bool | isConditional (unsigned index) |
|
void | setRef (header *scope, const char *id, char *data, unsigned size) |
|
void | getParams (header *scope, line_t *line) |
|
void | startScript (header *scr) |
|
virtual unsigned | getTypesize (const char *type_id) |
|
virtual const char * | getTypeinit (const char *type_id) |
|
virtual const char * | getFormat (symbol *sym, const char *id, char *temp) |
|
virtual bool | getCondition (const char *test, const char *value) |
|
const char * | getIndex (void) |
|
Runtime methods collection class.
This is used to collect the runtime implimentation of each script command. Often derived application servers will use sideway inheritance of something derived from interp to collect implimentations for convenience.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 399 of file ccscript.h.
typedef char ucommon::Script::interp::num_t[16] |
|
inherited |
bool interp::attach |
( |
Script * |
image, |
|
|
const char * |
entry = NULL |
|
) |
| |
|
inherited |
Attach a compiled image to the interpreter and start.
Even when different entry points are called, the initialization block is always called.
- Parameters
-
image | to attach (ref count). |
entry | point, NULL for "@main" |
- Returns
- true ifi successful, false if failed to find entry.
Definition at line 771 of file interp.cpp.
void interp::detach |
( |
void |
| ) |
|
|
inherited |
Cleanup after interpreter run.
Releases reference to image.
Definition at line 746 of file interp.cpp.
bool interp::error |
( |
const char * |
text | ) |
|
|
inherited |
Invoke runtime interpreter error handling.
- Parameters
-
text | to post into error symbol. |
Definition at line 68 of file interp.cpp.
bool interp::getCondition |
( |
const char * |
test, |
|
|
const char * |
value |
|
) |
| |
|
protectedvirtualinherited |
const char * interp::getContent |
( |
void |
| ) |
|
|
protectedinherited |
const char * interp::getContent |
( |
const char * |
text | ) |
|
|
protectedinherited |
const char * interp::getFilename |
( |
void |
| ) |
|
|
inherited |
Get effective filename of base.
- Returns
- filename.
Definition at line 751 of file interp.cpp.
const char * interp::getFormat |
( |
Script::symbol * |
sym, |
|
|
const char * |
id, |
|
|
char * |
temp |
|
) |
| |
|
protectedvirtualinherited |
const char * interp::getIndex |
( |
void |
| ) |
|
|
protectedinherited |
const char * interp::getKeyword |
( |
const char * |
id | ) |
|
|
protectedinherited |
unsigned interp::getResource |
( |
void |
| ) |
|
|
inherited |
Get current dsp resource mask.
- Returns
- resource mask.
Definition at line 935 of file interp.cpp.
char * interp::getTemp |
( |
void |
| ) |
|
|
protectedinherited |
const char * interp::getTypeinit |
( |
const char * |
type_id | ) |
|
|
protectedvirtualinherited |
unsigned interp::getTypesize |
( |
const char * |
type_id | ) |
|
|
protectedvirtualinherited |
const char * interp::getValue |
( |
void |
| ) |
|
|
protectedinherited |
Script::symbol * interp::getVar |
( |
const char * |
id, |
|
|
const char * |
value = NULL |
|
) |
| |
|
protectedinherited |
void interp::initialize |
( |
void |
| ) |
|
|
inherited |
Used to initialize and purge the interpreter between runs.
This is used especially if the same interpreter object is kept in memory and directly re-used for multiple executions.
Definition at line 45 of file interp.cpp.
bool interp::isConditional |
( |
unsigned |
index | ) |
|
|
protectedinherited |
bool interp::pop |
( |
void |
| ) |
|
|
protectedinherited |
void interp::pullBase |
( |
void |
| ) |
|
|
protectedinherited |
void interp::pullLoop |
( |
void |
| ) |
|
|
protectedinherited |
void interp::pullScope |
( |
void |
| ) |
|
|
protectedinherited |
void interp::push |
( |
void |
| ) |
|
|
protectedinherited |
bool ucommon::Script::methods::scrAdd |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrApply |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrBreak |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrCase |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrClear |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrConst |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrContinue |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrDefine |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrDo |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrElif |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrElse |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrEndcase |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrEndif |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrError |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrExit |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrExpand |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrExpr |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrForeach |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrGosub |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrGoto |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrIf |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrIgnore |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrIndex |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrInvoke |
( |
void |
| ) |
|
bool interp::scriptEvent |
( |
const char * |
name | ) |
|
|
protectedinherited |
Try to branch to a named event handler.
If successful, the interpreter transfers control to the start of the handler for the next step.
- Parameters
-
- Returns
- true if found.
Definition at line 825 of file interp.cpp.
Search for an event object in the method table.
- Parameters
-
- Returns
- method if found.
Definition at line 813 of file interp.cpp.
bool ucommon::Script::methods::scrLoop |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrNop |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrOtherwise |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrPack |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrPause |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrPrevious |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrPush |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrRef |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrRepeat |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrRestart |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrReturn |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrSet |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrUntil |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrVar |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrWhen |
( |
void |
| ) |
|
bool ucommon::Script::methods::scrWhile |
( |
void |
| ) |
|
bool interp::setConst |
( |
const char * |
id, |
|
|
const char * |
value |
|
) |
| |
|
protectedinherited |
void interp::setRef |
( |
Script::header * |
scope, |
|
|
const char * |
id, |
|
|
char * |
data, |
|
|
unsigned |
size |
|
) |
| |
|
protectedinherited |
void interp::skip |
( |
void |
| ) |
|
|
protectedinherited |
bool interp::step |
( |
void |
| ) |
|
|
inherited |
Step through an instance of the interpreter.
This can step through multiple lines at once, depending on Script::stepping.
- Returns
- true if still running, false if exited.
Definition at line 1003 of file interp.cpp.
bool interp::tryexit |
( |
void |
| ) |
|
|
protectedinherited |
bool interp::trylabel |
( |
const char * |
id | ) |
|
|
protectedinherited |
unsigned ucommon::Script::interp::frame |
|
protectedinherited |
object_pointer<Script> ucommon::Script::interp::image |
|
protectedinherited |
stack_t* ucommon::Script::interp::stack |
|
protectedinherited |
The documentation for this class was generated from the following files: