ccScript 5.1.0
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ucommon::Script::methods Class Reference

Runtime methods collection class. More...

#include <ccscript.h>

Inheritance diagram for ucommon::Script::methods:
Inheritance graph
[legend]
Collaboration diagram for ucommon::Script::methods:
Collaboration graph
[legend]

Public Types

typedef char num_t [16]
 

Public Member Functions

bool scrPush (void)
 
bool scrApply (void)
 
bool scrExpr (void)
 
bool scrVar (void)
 
bool scrSet (void)
 
bool scrAdd (void)
 
bool scrClear (void)
 
bool scrConst (void)
 
bool scrPause (void)
 
bool scrNop (void)
 
bool scrPack (void)
 
bool scrExpand (void)
 
bool scrExit (void)
 
bool scrReturn (void)
 
bool scrError (void)
 
bool scrRestart (void)
 
bool scrGosub (void)
 
bool scrGoto (void)
 
bool scrDo (void)
 
bool scrLoop (void)
 
bool scrUntil (void)
 
bool scrWhile (void)
 
bool scrBreak (void)
 
bool scrContinue (void)
 
bool scrForeach (void)
 
bool scrPrevious (void)
 
bool scrRepeat (void)
 
bool scrIndex (void)
 
bool scrCase (void)
 
bool scrEndcase (void)
 
bool scrOtherwise (void)
 
bool scrIf (void)
 
bool scrElif (void)
 
bool scrElse (void)
 
bool scrEndif (void)
 
bool scrDefine (void)
 
bool scrInvoke (void)
 
bool scrWhen (void)
 
bool scrRef (void)
 
bool scrIgnore (void)
 
bool step (void)
 Step through an instance of the interpreter. More...
 
bool attach (Script *image, const char *entry=NULL)
 Attach a compiled image to the interpreter and start. More...
 
void detach (void)
 Cleanup after interpreter run. More...
 
void initialize (void)
 Used to initialize and purge the interpreter between runs. More...
 
bool error (const char *text)
 Invoke runtime interpreter error handling. More...
 
unsigned getResource (void)
 Get current dsp resource mask. More...
 
const char * getFilename (void)
 Get effective filename of base. More...
 

Protected Member Functions

symbolfind (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...
 
eventscriptMethod (const char *name)
 Search for an event object in the method table. More...
 
char * getTemp (void)
 
bool setConst (const char *id, const char *value)
 
symbolcreateSymbol (const char *id)
 
symbolgetVar (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)
 

Protected Attributes

stack_tstack
 
object_pointer< Scriptimage
 
LinkedObject ** syms
 
unsigned frame
 

Detailed Description

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.

Member Typedef Documentation

typedef char ucommon::Script::interp::num_t[16]
inherited

Definition at line 256 of file ccscript.h.

Member Function Documentation

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
imageto attach (ref count).
entrypoint, NULL for "@main"
Returns
true ifi successful, false if failed to find entry.

Definition at line 771 of file interp.cpp.

Script::symbol * interp::createSymbol ( const char *  id)
protectedinherited

Definition at line 494 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
textto post into error symbol.

Definition at line 68 of file interp.cpp.

Script::symbol * interp::find ( const char *  id)
protectedinherited

Definition at line 724 of file interp.cpp.

bool interp::getCondition ( const char *  test,
const char *  value 
)
protectedvirtualinherited

Definition at line 1026 of file interp.cpp.

const char * interp::getContent ( void  )
protectedinherited

Definition at line 429 of file interp.cpp.

const char * interp::getContent ( const char *  text)
protectedinherited

Definition at line 351 of file interp.cpp.

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

Definition at line 97 of file interp.cpp.

const char * interp::getIndex ( void  )
protectedinherited

Definition at line 405 of file interp.cpp.

const char * interp::getKeyword ( const char *  id)
protectedinherited

Definition at line 388 of file interp.cpp.

Script::method_t interp::getLooping ( void  )
protectedinherited

Definition at line 421 of file interp.cpp.

void interp::getParams ( Script::header scope,
Script::line_t line 
)
protectedinherited

Definition at line 582 of file interp.cpp.

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

Definition at line 87 of file interp.cpp.

const char * interp::getTypeinit ( const char *  type_id)
protectedvirtualinherited

Definition at line 568 of file interp.cpp.

unsigned interp::getTypesize ( const char *  type_id)
protectedvirtualinherited

Definition at line 551 of file interp.cpp.

const char * interp::getValue ( void  )
protectedinherited

Definition at line 446 of file interp.cpp.

Script::symbol * interp::getVar ( const char *  id,
const char *  value = NULL 
)
protectedinherited

Definition at line 656 of file interp.cpp.

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

Definition at line 1138 of file interp.cpp.

bool interp::pop ( void  )
protectedinherited

Definition at line 946 of file interp.cpp.

void interp::pullBase ( void  )
protectedinherited

Definition at line 913 of file interp.cpp.

void interp::pullLoop ( void  )
protectedinherited

Definition at line 925 of file interp.cpp.

void interp::pullScope ( void  )
protectedinherited

Definition at line 919 of file interp.cpp.

void interp::push ( void  )
protectedinherited

Definition at line 957 of file interp.cpp.

bool ucommon::Script::methods::scrAdd ( void  )

Definition at line 670 of file methods.cpp.

bool ucommon::Script::methods::scrApply ( void  )
bool ucommon::Script::methods::scrBreak ( void  )

Definition at line 299 of file methods.cpp.

bool ucommon::Script::methods::scrCase ( void  )

Definition at line 146 of file methods.cpp.

bool ucommon::Script::methods::scrClear ( void  )

Definition at line 650 of file methods.cpp.

bool ucommon::Script::methods::scrConst ( void  )

Definition at line 611 of file methods.cpp.

bool ucommon::Script::methods::scrContinue ( void  )

Definition at line 324 of file methods.cpp.

bool ucommon::Script::methods::scrDefine ( void  )

Definition at line 210 of file methods.cpp.

bool ucommon::Script::methods::scrDo ( void  )

Definition at line 28 of file methods.cpp.

bool ucommon::Script::methods::scrElif ( void  )

Definition at line 200 of file methods.cpp.

bool ucommon::Script::methods::scrElse ( void  )

Definition at line 237 of file methods.cpp.

bool ucommon::Script::methods::scrEndcase ( void  )

Definition at line 140 of file methods.cpp.

bool ucommon::Script::methods::scrEndif ( void  )

Definition at line 205 of file methods.cpp.

bool ucommon::Script::methods::scrError ( void  )

Definition at line 628 of file methods.cpp.

bool ucommon::Script::methods::scrExit ( void  )

Definition at line 358 of file methods.cpp.

bool ucommon::Script::methods::scrExpand ( void  )

Definition at line 47 of file methods.cpp.

bool ucommon::Script::methods::scrExpr ( void  )

Definition at line 513 of file methods.cpp.

bool ucommon::Script::methods::scrForeach ( void  )

Definition at line 80 of file methods.cpp.

bool ucommon::Script::methods::scrGosub ( void  )

Definition at line 403 of file methods.cpp.

bool ucommon::Script::methods::scrGoto ( void  )

Definition at line 375 of file methods.cpp.

bool ucommon::Script::methods::scrIf ( void  )

Definition at line 258 of file methods.cpp.

bool ucommon::Script::methods::scrIgnore ( void  )

Definition at line 336 of file methods.cpp.

bool ucommon::Script::methods::scrIndex ( void  )

Definition at line 460 of file methods.cpp.

bool ucommon::Script::methods::scrInvoke ( void  )

Definition at line 215 of file methods.cpp.

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
nameof event to request.
Returns
true if found.

Definition at line 825 of file interp.cpp.

Script::event * interp::scriptMethod ( const char *  name)
protectedinherited

Search for an event object in the method table.

Parameters
nameto search for.
Returns
method if found.

Definition at line 813 of file interp.cpp.

bool ucommon::Script::methods::scrLoop ( void  )

Definition at line 194 of file methods.cpp.

bool ucommon::Script::methods::scrNop ( void  )

Definition at line 330 of file methods.cpp.

bool ucommon::Script::methods::scrOtherwise ( void  )

Definition at line 174 of file methods.cpp.

bool ucommon::Script::methods::scrPack ( void  )

Definition at line 694 of file methods.cpp.

bool ucommon::Script::methods::scrPause ( void  )

Definition at line 294 of file methods.cpp.

bool ucommon::Script::methods::scrPrevious ( void  )

Definition at line 35 of file methods.cpp.

bool ucommon::Script::methods::scrPush ( void  )

Definition at line 750 of file methods.cpp.

bool ucommon::Script::methods::scrRef ( void  )

Definition at line 505 of file methods.cpp.

bool ucommon::Script::methods::scrRepeat ( void  )

Definition at line 317 of file methods.cpp.

bool ucommon::Script::methods::scrRestart ( void  )

Definition at line 365 of file methods.cpp.

bool ucommon::Script::methods::scrReturn ( void  )

Definition at line 449 of file methods.cpp.

bool ucommon::Script::methods::scrSet ( void  )

Definition at line 803 of file methods.cpp.

bool ucommon::Script::methods::scrUntil ( void  )

Definition at line 185 of file methods.cpp.

bool ucommon::Script::methods::scrVar ( void  )

Definition at line 590 of file methods.cpp.

bool ucommon::Script::methods::scrWhen ( void  )

Definition at line 349 of file methods.cpp.

bool ucommon::Script::methods::scrWhile ( void  )

Definition at line 129 of file methods.cpp.

bool interp::setConst ( const char *  id,
const char *  value 
)
protectedinherited

Definition at line 463 of file interp.cpp.

void interp::setRef ( Script::header scope,
const char *  id,
char *  data,
unsigned  size 
)
protectedinherited

Definition at line 620 of file interp.cpp.

void interp::setStack ( Script::header scr,
Script::event ev = NULL 
)
protectedinherited

Definition at line 899 of file interp.cpp.

void interp::skip ( void  )
protectedinherited

Definition at line 808 of file interp.cpp.

void interp::startScript ( Script::header scr)
protectedinherited

Definition at line 756 of file interp.cpp.

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

Definition at line 985 of file interp.cpp.

bool interp::trylabel ( const char *  id)
protectedinherited

Definition at line 971 of file interp.cpp.

Member Data Documentation

unsigned ucommon::Script::interp::frame
protectedinherited

Definition at line 339 of file ccscript.h.

object_pointer<Script> ucommon::Script::interp::image
protectedinherited

Definition at line 337 of file ccscript.h.

stack_t* ucommon::Script::interp::stack
protectedinherited

Definition at line 336 of file ccscript.h.

LinkedObject** ucommon::Script::interp::syms
protectedinherited

Definition at line 338 of file ccscript.h.


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