SMLCONTEXT Class Reference

The main class used by SML functions. More...

#include <mi32/sml.h>

List of all members.

Public Member Functions

SMLSYMBOLAddClassSymbol (const char *name, char *classname, void *ptr)
SMLSYMBOLAddClassSymbol (const MIUNICODE *name, char *classname, void *ptr)
void AddNameAlias (const char *NewName, const char *OldName)
ERRVALUE AddObjectSymbol (const char *name, const RVC::OBJITEM &objitem, SMLSYMBOL **symp, UINT32 flags=0, const RVC::CREDENTIALS *Credentials=0)
ERRVALUE AddObjectSymbol (const MIUNICODE *name, const RVC::OBJITEM &objitem, SMLSYMBOL **symp, UINT32 flags=0, const RVC::CREDENTIALS *Credentials=0)
void AddOnExit (SMLONEXITDATA *data)
void AddRef ()
SMLSYMBOLAddSymbol (const char *name, SMLSTYPE stype)
SMLSYMBOLAddSymbol (const MIUNICODE *name, SMLSTYPE stype)
int AppendPrintBuffer (const char *)
int AppendPrintBuffer (const MIUNICODE *)
int BreakPointAdd (int offset)
int BreakPointRemove (int offset)
int BreakPointToggle (int offset)
int CallbackAdd (McbCallbackFunc func, void *cbdata, UINT32 reason)
int CallbackRemove (McbCallbackFunc func, void *cbdata, UINT32 reason)
int CallCallbacks (SMLCALLBACKSTRUCT *cbs)
void CallDestructors ()
double CallFunction (const char *name, ELEMTYPE elemtype, INT32 element=0)
ERRVALUE CallFunction (SMLSYMBOL *func, SMLARG *args, int numargs, UINT8 *tlist, SMLARG *ret)
int CheckForClassMemberErrors (FILE_TEXT &MissingClassFile)
void ClearPrintBuffer ()
UINT32 ClearStatusBits (UINT32 bits)
void CloseObjects ()
void * ConstructClassInstance (const char *ClassName)
bool CurrentFunctionIsClassMethod () const
 DEPRECATED_MSG ("Use Release() instead") int Destroy()
int Evaluate (int segnum, INT32 element, void *valp)
int Evaluate (int segnum, INT32 element, int ElemType, void *valp)
SMLGEOSTRUCT * GeorefAlloc ()
SMLGEOSTRUCT * GeorefCopy (const SMLGEOSTRUCT *src)
void GeorefFree (SMLGEOSTRUCT *georef)
bool GetAbortOnError () const
int GetArg (SMLARG *args, int numargs, int num, SMLOBJECT **pObject, bool UndefinedOK=false)
int GetArrayIndexBase () const
double GetCancelCheckInterval () const
bool GetCaseSensitiveStrings () const
int GetCodeSize () const
CONSOLE * GetConsoleInterface () const
const SMLMACHINEINSTGetCS () const
SMLMACHINEINSTGetCSNonConst () const
const SMLFUNCGetCurrentFunction () const
MIUNICODEGetCurrentFunctionName () const
SMLSYMBOLGetDestObjectSymbol (int numargs, SMLARG *args, UINT8 *argtype, SMLSTYPE OutSTYPE, UINT32 flags)
const DISPLAYINFOGetDispInfo () const
int GetErrorLine () const
int GetExitOnError () const
SMLSYMBOLGetFieldSymbol (SMLSYMBOL *t, SMLSYMBOL *f)
SMLSYMBOLGetFieldSymbol (int table, int field)
SMLSYMBOLGetForEachRastSym () const
char * GetFuncGroupName (int num) const
int GetFunctionTypeList (char ***namep, int **typep) const
ERRVALUE GetLastError (INT32 *pos=0, bool bClearErrorState=true)
int GetLastError (MISTRING &msg, INT32 *pos=0)
SMLSTRINGGetLastPoppedString () const
int GetMainObject (RVC::OBJITEM &ObjItem) const
int GetNeedLineNumbersInCode () const
int GetNumBreakPoints () const
int GetNumFuncClasses () const
SMLOBJECTGetObjectList () const
const SMLMACHINEINSTRUCTION * GetOpCodeData (int opcode) const
MDLGPARENT GetParentWidget () const
void * GetParentWidgetVoid () const
int GetParserWarningLevel () const
const MISTRINGGetParserWarnings () const
const SMLMACHINEINSTGetPC () const
ERRVALUE GetPCList (SIMPLE_ARRAY< const SMLMACHINEINST * > &plist)
int GetPCList (SMLMACHINEINST ***plist)
SMLSYMBOLGetPrimaryKeySymbol (SMLSYMBOL *fk_sym)
int GetPrimaryTable (int segment) const
const MISTRINGGetPrintBufferMISTRING () const
SMLDEVPRIVATEGetPrivData (int pindex) const
int GetProgBase () const
int GetProgPtr () const
char * GetRCSID (SMLSOURCEINFO *fni)
SMLCLASSGetRegisteredClassList () const
RVC::DATABASEHANDLE * GetRootElemDBHandle () const
int GetRootElemNum () const
int GetRootElemType () const
const FILEPATHGetScriptFilePath () const
INT32 GetScriptInode () const
const RVC::OBJITEMGetScriptObjItem () const
int GetSegmentByXMLNode (const XMLNODE *node) const
int GetSegmentElemType (int segment=-1) const
const XMLNODEGetSegmentXMLNode (int segnum) const
const SMLSOURCEINFO * GetSourceInfo (const SMLMACHINEINST *pc) const
bool GetSourceLine (const SMLMACHINEINST *pc, MISTRING &mistr) const
const SMLPARSEPOS * GetSourcePos (const SMLMACHINEINST *pc) const
UINT32 GetStatus () const
STATUSCONTEXTGetStatusContext () const
SMLSYMBOLGetStdSym () const
SMLSYMBOLGetSymbol (const MIUNICODE *name) const
SMLSYMBOLGetSymbol (const char *name) const
SMLSYMBOLGetSymbolListFuncs (int group=0) const
SMLSYMBOLGetSymbolListGlobal (int level=0) const
SMLSYMBOLGetSymbolListLocal () const
SMLSYMBOLGetSymbolListPerm () const
int GetSymbolNameList (int funcgroup, MISTRINGLIST &names, bool bIncludeAliases=true) const
int GetSymbolTypeList (char ***namep, int **typep) const
SMLSYMBOLGetTableSymbol (int table)
const SIMPLE_ARRAY< SMLFIELDDATA > & GetUnindexedFieldList () const
SMLUSAGE GetUsage (int Segment) const
XMLDOCGetXMLDoc () const
bool HasBreakPoint (int offset) const
bool HasCancelFunc () const
int InstallClass (SMLCLASS *staticClass)
int InstallEnum (const char *name, int(*func)(SMLCONTEXT *, void *, SMLFLAG **), void *funcdata, UINT32 flags)
int InstallEnum (const char *name, SMLFLAG *smlflags, UINT32 flags)
int InstallFunctionList (const SMLFUNCINSTALLER *funclist)
int InstallFunctions (const char *symclass, const SMLFUNC *vfuncs)
void InstallSMLOnlyFunctions ()
bool IsBeingDestroied () const
void List (MISTRING &)
void List (FILE *file)
int ListLine (const SMLMACHINEINST *c, bool bIgnoreBad, bool bMarkIt, MIUNICODE *buf, int len)
int ListLine (const SMLMACHINEINST *c, bool bIgnoreBad, bool bMarkIt, MISTRING &buf)
SMLFLAGLookupEnumList (char *name)
SMLFLAGLookupEnumList (const char *name)
ERRVALUE MemAlloc (void **pRet, UINT32 size)
ERRVALUE MemAllocC (void **pRet, UINT32 size)
void MemFree (void *ptr)
int ObjectAlloc (SMLTINOBJECT **)
int ObjectAlloc (SMLCADOBJECT **)
int ObjectAlloc (SMLVECTOROBJECT **)
int ObjectAlloc (SMLRASTEROBJECT **)
SMLOBJECTObjectAlloc (SMLSTYPE stype)
int Optimize ()
void OutstandingDestroysDec ()
int OutstandingDestroysGet () const
void OutstandingDestroysInc ()
int Parse (int segnum, const MIUNICODE *str, UINT32 flags=0)
int PrivDataIndexAlloc ()
void RecycleStrings (bool FreeStringsInCodeToo=false)
void RegisterObjectCloseFunc (SMLSTYPE stype, int(*func)(SMLCONTEXT *, SMLOBJECT *))
void Release ()
int ResolveClassMembers (FILE *MissingClassFile=NULL)
int Run (int segnum, UINT32 flags=0)
int SegmentCreate (SMLUSAGE usage, ELEMTYPE ElemType=ELEMTYPE_Empty, int table=-1)
int SegmentDestroy (int segment)
void SetAbortOnError (bool value)
void SetCancelCheckInterval (double seconds)
void SetCancelFunc (int(*func)(SMLCONTEXT *, void *), void *data)
void SetCaseSensitiveStrings (bool sensitive=true)
void SetConsole (CONSOLE *console)
void SetDebugger (SMLDEBUG *debug)
void SetDispInfo (const DISPLAYINFO &info)
int SetErrorCode (int code)
int SetErrorCodeAndAbort (int code)
void SetErrorMessageForce (MIUNICODE *s)
void SetNeedLineNumbersInCode (int val)
void SetParentWidget (MDLGPARENT widget)
ERRVALUE SetParmError (int parmnum, int errcode=EBadFuncParm, const MIUNICODE *funcname=0)
void SetParserWarningLevel (int level)
void SetPrivData (int pindex, SMLDEVPRIVATE *pdata)
void SetScriptFilePath (const FILEPATH &filepath)
void SetScriptObjItem (const RVC::OBJITEM &objitem)
ERRVALUE SetSegment (int segnum)
void SetSegmentXMLNode (int segnum, const XMLNODE *node)
UINT32 SetStatusBits (UINT32 bits)
void SetStatusContext (STATUSCONTEXT *status)
int SetupObjectDatabase (SMLOBJECT *obj, RVC::FILEHANDLE *filehandle, RVC::DATABASEHANDLE *dbhandle, SMLELEMDATA *ElemData, ELEMTYPE ElemType, const RVC::CREDENTIALS *Credentials, bool fromcb=false)
void SetUsage (int Segment, SMLUSAGE usage)
void SetXMLDoc (XMLDOC *doc)
int Stop ()
int Stop (bool bCanDestroyContext)
SMLSTRINGStringAlloc (const MIUNICODE *str)
SMLSTRINGStringAlloc (const STRUTF8 &str)
SMLSTRINGStringAlloc (const MISTRING &str)
SMLSTRINGStringAlloc (const UINT8 *str)
SMLSTRINGStringAlloc (const char *str)
void StringFree (SMLSTRING *)
SMLSYMBOLTempObjectSymbolAlloc (SMLSTYPE stype)
void TempObjectSymbolFree (SMLSYMBOL *)
int TestCancelOnce ()
bool TestClass (const SMLCLASS *GivenClass, const SMLCLASS *NeededClass) const
bool TestClass (const char *GivenClassName, const SMLCLASS *NeededClass) const
void VMExecute (SMLMACHINEINST *pc)
int VMReset ()

Static Public Member Functions

static int CallbackAddGlobal (McbCallbackFunc func, void *cbdata, UINT32 reason)
static int CallbackRemoveGlobal (McbCallbackFunc func, void *cbdata, UINT32 reason)
static char * GetOperator (int num)
static char * GetOperatorDescription (int num)
static char * GetOperatorHelp (int num)
static char ** GetOperatorList ()
static void RegisterFunctionList (const SMLFUNCINSTALLER *FuncList)
static void RegisterMinimalFunctionList (const SMLFUNCINSTALLER *FuncList)
static int STYPEFlags (SMLSTYPE stype)
static char * STYPEtoString (SMLSTYPE stype)
static int STYPEToTokenVal (SMLSTYPE stype)
static SMLSTYPE TokenValToSTYPE (int tval)


Detailed Description

The main class used by SML functions.

Definition at line 5317 of file sml.h.


Member Function Documentation

SMLSYMBOL* SMLCONTEXT::AddClassSymbol ( const char *  name,
char *  classname,
void *  ptr 
)

Add a class symbol to the context (char*) name.

See details in the (MIUNICODE*) version of this method

Returns:
the symbol added
Parameters:
name  Symbol name
classname  SML class name (SMLCLASSNAME_...)
ptr  Pointer to the data the symbol represents

SMLSYMBOL* SMLCONTEXT::AddClassSymbol ( const MIUNICODE name,
char *  classname,
void *  ptr 
)

Add a class symbol to the context (MIUNICODE*) name.

This would let you add, for example, a COLOR symbol for use in a query.

Returns:
the symbol added
Parameters:
name  Symbol name
classname  SML class name (SMLCLASSNAME_...)
ptr  Pointer to the data the symbol represents

void SMLCONTEXT::AddNameAlias ( const char *  NewName,
const char *  OldName 
)

Setup an alias for a class or function Existing scripts will be able to refer to the class or function using OldName, but will get a parser warning that the name has changed.

Note: both names must be string literals or static. The context only keeps the pointers

ERRVALUE SMLCONTEXT::AddObjectSymbol ( const char *  name,
const RVC::OBJITEM objitem,
SMLSYMBOL **  symp,
UINT32  flags = 0,
const RVC::CREDENTIALS Credentials = 0 
)

Add symbol referring to object using 'char*' name.

ERRVALUE SMLCONTEXT::AddObjectSymbol ( const MIUNICODE name,
const RVC::OBJITEM objitem,
SMLSYMBOL **  symp,
UINT32  flags = 0,
const RVC::CREDENTIALS Credentials = 0 
)

Add symbol referring to object using 'MIUNICODE*' name.

void SMLCONTEXT::AddOnExit ( SMLONEXITDATA *  data  ) 

Add an OnExit entry to the OnExitList.

void SMLCONTEXT::AddRef (  ) 

COM-like AddRef method An SMLCONTEXT is not a COM object, but uses AddRef/Release symantics.

SMLSYMBOL* SMLCONTEXT::AddSymbol ( const char *  name,
SMLSTYPE  stype 
)

Add a symbol to the context (char*) name.

Returns:
the symbol added

SMLSYMBOL* SMLCONTEXT::AddSymbol ( const MIUNICODE name,
SMLSTYPE  stype 
)

Add a symbol to the context (MIUNICODE*) name.

Returns:
the symbol added

int SMLCONTEXT::AppendPrintBuffer ( const char *   ) 

Append an ISO-2022 string to the print buffer.

int SMLCONTEXT::AppendPrintBuffer ( const MIUNICODE  ) 

Append a Unicode string to the print buffer.

int SMLCONTEXT::BreakPointAdd ( int  offset  ) 

Add a breakpoint at the current offset.

(offset = pc - cs)

int SMLCONTEXT::BreakPointRemove ( int  offset  ) 

Remove a breakpoint from the current offset.

(offset = pc - cs)

int SMLCONTEXT::BreakPointToggle ( int  offset  ) 

Toggle a breakpoint at the current offset.

(offset = pc - cs)

int SMLCONTEXT::CallbackAdd ( McbCallbackFunc  func,
void *  cbdata,
UINT32  reason 
)

Add a callback.

For a list of possible callback reasons

See also:
SMLCALLBACKSTRUCT

static int SMLCONTEXT::CallbackAddGlobal ( McbCallbackFunc  func,
void *  cbdata,
UINT32  reason 
) [static]

Add a callback to the Global callback list.

For a list of possible callback reasons

See also:
SMLCALLBACKSTRUCT

int SMLCONTEXT::CallbackRemove ( McbCallbackFunc  func,
void *  cbdata,
UINT32  reason 
)

Remove a callback.

For a list of possible callback reasons

See also:
SMLCALLBACKSTRUCT

static int SMLCONTEXT::CallbackRemoveGlobal ( McbCallbackFunc  func,
void *  cbdata,
UINT32  reason 
) [static]

Remove a callback from the Global callback list.

For a list of possible callback reasons

See also:
SMLCALLBACKSTRUCT

int SMLCONTEXT::CallCallbacks ( SMLCALLBACKSTRUCT cbs  ) 

Call the callback list.

For a list of possible callback reasons

See also:
SMLCALLBACKSTRUCT

void SMLCONTEXT::CallDestructors (  ) 

Call the destructors symbols pointing to class data.

This calls SMLSYMBOLL::DisposeOFContents() for all STYPE_ClassVar symbols

double SMLCONTEXT::CallFunction ( const char *  name,
ELEMTYPE  elemtype,
INT32  element = 0 
)

Calls the named function.

Looks up a built-in or user-defined function by name and calls it with no parameters. Also sets the current element like SMLCONTEXT::Evaluate().

There's a more flexible version of this function which takes a list of parameters to be passed to the function.

Note:
This only works for procedures (no return value) or functions that return numeric values. It call any other type of function, you must use the other version of CallFunction().
Returns:
The value returned by the function or 0 if it was a procedure.

ERRVALUE SMLCONTEXT::CallFunction ( SMLSYMBOL func,
SMLARG args,
int  numargs,
UINT8 tlist,
SMLARG ret 
)

Call a function pointed to by a given symbol.

This is used internally to call both user-defined and built-in SML functions. One possible use for this function would be to see if a query has some user-defined function in it and if so, call it once before drawing. For example:

    UINT8 type = SMLSTYPE_Class;
    SMLARG arg, ret;
    SMLSYMBOL* func;
    arg.ptr = layer;          // Layer about to be drawn

    func = context->GetSymbol("OnDrawBegin");
    if (func) context->CallFunction(func, args, 1, types, &ret);
    // Do the drawing here
    func = context->GetSymbol("OnDrawEnd");
    if (func) context->CallFunction(func, args, 1, types, &ret);
Parameters:
func  SMLSYMBOL of function to call
args  List of arguments to pass
numargs  Number of arguments in "args"
tlist  SMLSTYPEs of the args
ret  Return value

int SMLCONTEXT::CheckForClassMemberErrors ( FILE_TEXT MissingClassFile  ) 

Scans all functions and classes to make sure the classes their members and parameters refer to are known.

Any errors are written out to the MissingClassFile

void SMLCONTEXT::ClearPrintBuffer (  ) 

Clears the buffer used by printf functions.

When running in an SML context, printf prints to a console window and there is no print buffer. In all other contexts, printf functions append text to a buffer which the caller can retrieve.

UINT32 SMLCONTEXT::ClearStatusBits ( UINT32  bits  ) 

Clear one or more status bits.

void SMLCONTEXT::CloseObjects (  ) 

Closes all open objects.

This is done automatically when the script exits.

void* SMLCONTEXT::ConstructClassInstance ( const char *  ClassName  ) 

Create an instance of a class pointer You should use the SMLCLASSNAME_Xxx macros for the class name.

This makes them easier to search for and prevents mistakes due to typos (or at least lets the compiler catch them). Any SML function or class member that returns a copy of something that it expects SML to delete should use this method to allocate the thing being returned, unless you know for a fact that SML expects it to be allocated with new/delete. That way, as the older classes get converted over to be allocated with new/delete, you won't have to change anything.

bool SMLCONTEXT::CurrentFunctionIsClassMethod (  )  const

Returns true if the current function is a class method.

This is for use in built-in functions. If it returns true, then args[-1] is a pointer to "this". This is useful when you have an existing function that takes a pointer to a class as its first member and want to make it do double duty as a class method. For example, the SML function ViewRedraw() takes a view (args[0] and a flag (args[1]). As a class method, it would take the same parameters but view would be args[-1] and the flags args[0]) Note that this is only valid for functions which match the prototype whatever FuncName(int numargs, SMLARG* args, UINT8* type, SMLCONTEXT* context)

SMLCONTEXT::DEPRECATED_MSG ( "Use Release() instead"   ) 

Destroy the context.

Will free it as well, so don't access the context after calling this function. If we were using constructor/desctructors for this, this would be the destructor. However, If any widget destroy callbacks have been registered, the actual context will stick around until the last of them has been called. Use Release() instead

int SMLCONTEXT::Evaluate ( int  segnum,
INT32  element,
void *  valp 
)

Evaluate a query for a given element Uses the element type given when the segment was created.

int SMLCONTEXT::Evaluate ( int  segnum,
INT32  element,
int  ElemType,
void *  valp 
)

Evaluate a query for a given element of a given type Might be better to call the other version of this method which does not take an elemtype.

SMLGEOSTRUCT* SMLCONTEXT::GeorefAlloc (  ) 

Allocate an SMLGEOSTRUCT.

Code outside rvcsys.dll cannot construct SMLGEOSTRUCTs since the size of the struct is private

SMLGEOSTRUCT* SMLCONTEXT::GeorefCopy ( const SMLGEOSTRUCT *  src  ) 

Copy an SMLGEOSTRUCT.

void SMLCONTEXT::GeorefFree ( SMLGEOSTRUCT *  georef  ) 

Free an SMLGEOSTRUCT.

bool SMLCONTEXT::GetAbortOnError (  )  const

Get the AbortOnError flag.

If set (which it is by default, then any built-in function that gets an error and calls SetErrorCode() will cause the script to abort and popup an error dialog. If cleared, the error will be noted but the script will go on and the script writer can check GetLastError() to see if there was an error.

int SMLCONTEXT::GetArg ( SMLARG args,
int  numargs,
int  num,
SMLOBJECT **  pObject,
bool  UndefinedOK = false 
)

Get an argument from the argument list Can return an error if the argument is invalid in this case, the SML ErrorCode has already been set and you just have to return.

Note, the args/numargs parameters are in the opposite order of the old function. I thought that was a stupid order.

int SMLCONTEXT::GetArrayIndexBase (  )  const

Get the array index base (normally 1, but can be overridden).

double SMLCONTEXT::GetCancelCheckInterval (  )  const

Return the time in seconds between each cancel check.

bool SMLCONTEXT::GetCaseSensitiveStrings (  )  const

Return whether or not string comparisons should be case sensitive.

int SMLCONTEXT::GetCodeSize (  )  const

Get the size of the bytecode in memory.

CONSOLE* SMLCONTEXT::GetConsoleInterface (  )  const

Returns the console handle.

const SMLMACHINEINST* SMLCONTEXT::GetCS (  )  const

Get the current Code Segment (CS) (const).

SMLMACHINEINST* SMLCONTEXT::GetCSNonConst (  )  const

Get the current Code Segment (CS) (non-const).

const SMLFUNC* SMLCONTEXT::GetCurrentFunction (  )  const

Return the SMLFUNC* of the current function.

This is only valid while running, not parsing.

MIUNICODE* SMLCONTEXT::GetCurrentFunctionName (  )  const

Return the name of the current function.

This is only valid while running, not parsing. This should return a (const MIUNICODE *), but not all the places that need it know about const yet.

SMLSYMBOL* SMLCONTEXT::GetDestObjectSymbol ( int  numargs,
SMLARG args,
UINT8 argtype,
SMLSTYPE  OutSTYPE,
UINT32  flags 
)

Return symbol for return value of a function returning an object.

This is a magic function. Given the arguments, it returns a symbol pointing to the destination symbol. If it has to, it makes a new temporary symbol and returns that. However, it first looks at the next instruction in the code. If it's an opOBJASGN, it returns the next symbol on the stack (args[-1]), which will be the variable that opOBJASGN will assign into. It then adjusts the PC to skip the assignment instruction and adjusts the frame pointer to make the dest variable pop off with the rest of the function parameters when the funtion returns.

Allowable flags:

- Do not write any more functions that return vector or cad objects. If you do, I'll have to hurt you.
Parameters:
numargs  number of arguments passed to SML func
args  SML function's argument list
argtype  SML functions's argument types
OutSTYPE  STYPE of the object to be returned
flags  Flags (see above)

const DISPLAYINFO* SMLCONTEXT::GetDispInfo (  )  const

Returns the display info set by previous call to SetDispInfo.

SML doesn't use this information except to pass it through to the script is _context.DisplayInfo

int SMLCONTEXT::GetErrorLine (  )  const

Returns the line of the last error.

int SMLCONTEXT::GetExitOnError (  )  const

Returns true if we want scripts to exit on errors.

We let the script change this and a few SML functions return error codes rather than causing the script to exit.

SMLSYMBOL* SMLCONTEXT::GetFieldSymbol ( SMLSYMBOL t,
SMLSYMBOL f 
)

Return the SMLSYMBOL of a database field.

This version only used by the parser.

SMLSYMBOL* SMLCONTEXT::GetFieldSymbol ( int  table,
int  field 
)

Return the SMLSYMBOL of a database field.

Parameters:
table  Table number
field  Field number

SMLSYMBOL* SMLCONTEXT::GetForEachRastSym (  )  const

Returns the current raster being processed by a "foreach" or NULL if none.

char* SMLCONTEXT::GetFuncGroupName ( int  num  )  const

Get the name of a function group (don't free this) Maybe this should return const? Should it look up the name in messages.txt for us or should the caller? (Currently we expect the caller to do that).

int SMLCONTEXT::GetFunctionTypeList ( char ***  namep,
int **  typep 
) const

Returns function types and names for the "Insert Function" dialogs.

ERRVALUE SMLCONTEXT::GetLastError ( INT32 pos = 0,
bool  bClearErrorState = true 
)

Returns the last error code, and (optionally) position where the error occured.

Calling this function also clears the error condition by default. You can pass false for bClearErrorState to prevent that. If error occured in an include file, pos returned will be -1 to tell us not to try to move the cursor (not in the text widget)

int SMLCONTEXT::GetLastError ( MISTRING msg,
INT32 pos = 0 
)

Returns the last error code, message and position where the error occured.

Calling this function also clears the error condition If error occured in an include file, pos returned will be -1 to tell us not to try to move the cursor (not in the text widget)

SMLSTRING* SMLCONTEXT::GetLastPoppedString (  )  const

Retrieves the last SMLSTRING to be popped from the stack.

Note:
The string returned can be modified (I don't know why you would), but don't free it!

int SMLCONTEXT::GetMainObject ( RVC::OBJITEM ObjItem  )  const

Returns the RVC::OBJITEM of the main object this query is for.

Returns 1 if there is a main object, 0 if not

int SMLCONTEXT::GetNeedLineNumbersInCode (  )  const

Will return true if the parser needs to emit opLINE codes for the debugger.

(Used to interleave source and assembly)

int SMLCONTEXT::GetNumBreakPoints (  )  const

Returns the current number of breakpoints set in the debugger.

int SMLCONTEXT::GetNumFuncClasses (  )  const

Get the number of function groups.

SMLOBJECT* SMLCONTEXT::GetObjectList (  )  const

For internal use only (should be private, but used by non-member funcs in qqobject.c).

const SMLMACHINEINSTRUCTION* SMLCONTEXT::GetOpCodeData ( int  opcode  )  const

Get specification of an SML bytecode opcode.

Bad name. Should have been GetOpcodeData()

static char* SMLCONTEXT::GetOperator ( int  num  )  [static]

Return the string for the n'th operator.

static char* SMLCONTEXT::GetOperatorDescription ( int  num  )  [static]

Return the description for the n'th operator.

static char* SMLCONTEXT::GetOperatorHelp ( int  num  )  [static]

Return the help code for the n'th operator.

static char** SMLCONTEXT::GetOperatorList (  )  [static]

Return the list of operators (for the Insert Operator dialog).

MDLGPARENT SMLCONTEXT::GetParentWidget (  )  const

Get the parent widget to use for popping up dialogs and such.

We ran into a problem with WIN32_NATIVE code. Since MDLGPARENT is just a typedef that normally resolves to Widget, the function signature said it returned a Widget. Then if you compile for WIN32_NATIVE, the prototype says it should be a CWnd and the signatures don't match, giving an unresolved external. To get around this, I added the (void*) version below and modified all code to use that instead. Need to keep the other one around though for old code.

void* SMLCONTEXT::GetParentWidgetVoid (  )  const

Get Parent Widget.

See also:
SMLCONTEXT::GetParentWidget()

int SMLCONTEXT::GetParserWarningLevel (  )  const

const MISTRING& SMLCONTEXT::GetParserWarnings (  )  const

Return the warnings from the most recient call to Parse().

const SMLMACHINEINST* SMLCONTEXT::GetPC (  )  const

ERRVALUE SMLCONTEXT::GetPCList ( SIMPLE_ARRAY< const SMLMACHINEINST * > &  plist  ) 

int SMLCONTEXT::GetPCList ( SMLMACHINEINST ***  plist  ) 

Function used by the debugger only.

If debugger becomes a friend class, this function can be made private

SMLSYMBOL* SMLCONTEXT::GetPrimaryKeySymbol ( SMLSYMBOL fk_sym  ) 

int SMLCONTEXT::GetPrimaryTable ( int  segment  )  const

Return the primary table for a segment.

(assuming a pinmap query or computed field)

const MISTRING& SMLCONTEXT::GetPrintBufferMISTRING (  )  const

Return the contents of the print buffer in Unicode.

When running in an SML context, printf prints to a console window and there is no print buffer. In all other contexts, printf functions append text to a buffer which the caller can retrieve.

SMLDEVPRIVATE* SMLCONTEXT::GetPrivData ( int  pindex  )  const

Get private data for this context.

Allocate an index with PrivDataIndexAlloc()

int SMLCONTEXT::GetProgBase (  )  const

Used by parser.

int SMLCONTEXT::GetProgPtr (  )  const

Used by parser.

char* SMLCONTEXT::GetRCSID ( SMLSOURCEINFO *  fni  ) 

this function should be private but.

.. for now needs to be called from a C style stub function.

SMLCLASS* SMLCONTEXT::GetRegisteredClassList (  )  const

Returns the list of registered classes.

RVC::DATABASEHANDLE* SMLCONTEXT::GetRootElemDBHandle (  )  const

Returns the root database handle (may be null) which should be used to allocate a cursor if calling Evaluate with ELEMTYPE_DBCursor Note: for internal use only.

int SMLCONTEXT::GetRootElemNum (  )  const

return the element number we're evauating the query for.

Note:
only for element queries

int SMLCONTEXT::GetRootElemType (  )  const

Returns the main ELEMTYPE_Xxxx if this is a query.

(eg, polygon style query)

const FILEPATH& SMLCONTEXT::GetScriptFilePath (  )  const

Get the filename of the current script.

INT32 SMLCONTEXT::GetScriptInode (  )  const

Gets the inode of the current script if it came from an RVC file.

Returns:
an inode or 0 if the script didn't come from an RVC file

const RVC::OBJITEM& SMLCONTEXT::GetScriptObjItem (  )  const

Gets the RVC::OBJITEM of the script.

int SMLCONTEXT::GetSegmentByXMLNode ( const XMLNODE node  )  const

Given an XMLNODE, return the segment that was parsed from it.

This is used to identify scripts from an XML <script> tag so that we don't parse the same tag twice. Returns the segment number or -1 if no segment came from the given node. Note that if node is 0, it will return the first node that did NOT come from an XML node.

int SMLCONTEXT::GetSegmentElemType ( int  segment = -1  )  const

Returns SegmentType() & QTYPE_ELEMTYPE_MASK.

If segment -1 is passed (or omitted since -1 is the default) it will use the "current" segment. This only works while a script is running

const XMLNODE* SMLCONTEXT::GetSegmentXMLNode ( int  segnum  )  const

Return the XMLNODE this segment was parsed from.

Assumes SetSegmentXMLNode was called to set the segment earlier

const SMLSOURCEINFO* SMLCONTEXT::GetSourceInfo ( const SMLMACHINEINST pc  )  const

bool SMLCONTEXT::GetSourceLine ( const SMLMACHINEINST pc,
MISTRING mistr 
) const

const SMLPARSEPOS* SMLCONTEXT::GetSourcePos ( const SMLMACHINEINST pc  )  const

UINT32 SMLCONTEXT::GetStatus (  )  const

Get the current SMLSTATUS bits.

STATUSCONTEXT* SMLCONTEXT::GetStatusContext (  )  const

Get the STATUSCONTEXT of the status line of the SML editor.

Note:
returns NULL if there is no status line or SML editor

SMLSYMBOL* SMLCONTEXT::GetStdSym (  )  const

Need to rename this.

_I_ don't even rememeber what it is (DCW)

SMLSYMBOL* SMLCONTEXT::GetSymbol ( const MIUNICODE name  )  const

Get an SMLSYMBOL by (MIUNICODE*) name.

Programmer accessable function to get a symbol from the symbol table after evaluating the query. Actually returns a pointer to the symbol.

SMLSYMBOL* SMLCONTEXT::GetSymbol ( const char *  name  )  const

Get an SMLSYMBOL by (char*) name.

Programmer accessable function to get a symbol from the symbol table after evaluating the query. Actually returns a pointer to the symbol.

SMLSYMBOL* SMLCONTEXT::GetSymbolListFuncs ( int  group = 0  )  const

Get the symbol list for a group of functions.

SMLSYMBOL* SMLCONTEXT::GetSymbolListGlobal ( int  level = 0  )  const

Gets the main symbol list.

SMLSYMBOL* SMLCONTEXT::GetSymbolListLocal (  )  const

Gets the symbol list at the current scope.

SMLSYMBOL* SMLCONTEXT::GetSymbolListPerm (  )  const

Gets the symbol list for permanent symbols.

int SMLCONTEXT::GetSymbolNameList ( int  funcgroup,
MISTRINGLIST names,
bool  bIncludeAliases = true 
) const

Get the list of symbols for a function group.

This function gives you a list of the functions in a particular function group.

Returns:
the number of strings in the array.
Parameters:
funcgroup is the group number of the function group to get. You can find the number of function groups by calling SMLCONTEXT::GetNumFuncClasses().
names Gets filled in with a list of function names
bIncludeAliases If true (default), include aliases in the list of symbols.
See also:
SMLCONTEXT::GetNumFuncClasses()

SMLCONTEXT::GetFunctionTypeList()

int SMLCONTEXT::GetSymbolTypeList ( char ***  namep,
int **  typep 
) const

Returns symbol types and names for the "Insert Symbol" dialogs.

SMLSYMBOL* SMLCONTEXT::GetTableSymbol ( int  table  ) 

Get the SMLSYMBOL for a database table.

Parameters:
table  Table number

const SIMPLE_ARRAY<SMLFIELDDATA>& SMLCONTEXT::GetUnindexedFieldList (  )  const

Return a list of fields accessed by the most reciently parsed query which are not indexed.

If the query will be evaluated multiple times, you may decide to index the fields first, or possibly let the user decide. If you do end up indexing them, you should reparse the query to get it to use the index.

SMLUSAGE SMLCONTEXT::GetUsage ( int  Segment  )  const

Set the usage for this script.

Allows parser to warn or give an error if user tries to use a script for the wrong thing

XMLDOC* SMLCONTEXT::GetXMLDoc (  )  const

Get the XMLDOC that this script was parsed from, if any.

Note: the document is owned by the context. The caller may modify it, but should not free it.

bool SMLCONTEXT::HasBreakPoint ( int  offset  )  const

Returns true if there is a breakpoint at a particular offset.

bool SMLCONTEXT::HasCancelFunc (  )  const

Returns true if we should call TestCancleOnce() occasionally in grunt loops (to keep the server happy).

int SMLCONTEXT::InstallClass ( SMLCLASS staticClass  ) 

Install a class definition.

int SMLCONTEXT::InstallEnum ( const char *  name,
int(*)(SMLCONTEXT *, void *, SMLFLAG **)  func,
void *  funcdata,
UINT32  flags 
)

Installs a list of enum values which must be generated at runtime.

This is useful for installing things like distance units which must be read from units.txt

Possible flags: SMLFLAG_FreeFlagArray - Free the smlflags when the context is destroyed SMLFLAG_FreeName - Free the name parameter of all the flags (not the name parameter, that's const and it makes a copy) SMLFLAG_FreeDesc - Free the desc parameter of all the flags

int SMLCONTEXT::InstallEnum ( const char *  name,
SMLFLAG smlflags,
UINT32  flags 
)

Installs a list of enum values which can be used in SMLCLASSMEMBERs.

To define a member which is an enum, you make the member's type as if it were a numeric member, but give it STYPE_Enum and set the ResourceName to the name the enum was registered as

Possible flags: SMLFLAG_FreeFlagArray - Free the smlflags when the context is destroyed SMLFLAG_FreeName - Free the name parameter of all the flags (not the name parameter, that's const and it makes a copy) SMLFLAG_FreeDesc - Free the desc parameter of all the flagss

int SMLCONTEXT::InstallFunctionList ( const SMLFUNCINSTALLER funclist  ) 

Install a list of functions (For a new method of installing functions which has not been completely implemented yet.

Use InstallFunctions() for now)

int SMLCONTEXT::InstallFunctions ( const char *  symclass,
const SMLFUNC vfuncs 
)

Install a list of functions.

The vfuncs parameter is an array of SMLFUNCs with the last member of the array having NULL for the function name

void SMLCONTEXT::InstallSMLOnlyFunctions (  ) 

Install functions which should only be available in SML (not query).

This just calls all MsmlCR_InstallFuncsSML callbacks. It is done for you by the various

bool SMLCONTEXT::IsBeingDestroied (  )  const

Returns true if the contest is being destroied or has been destoied and is waiting for the last widget destroy callback to actually free itself.

void SMLCONTEXT::List ( MISTRING  ) 

Dump a disassembled listing of the bytecode to an MISTRING.

void SMLCONTEXT::List ( FILE *  file  ) 

Dump a disassembled listing of the bytecode to a file.

int SMLCONTEXT::ListLine ( const SMLMACHINEINST c,
bool  bIgnoreBad,
bool  bMarkIt,
MIUNICODE buf,
int  len 
)

Function used by List() and by the debugger.

(If debugger becomes a friend class, this function can become private)

int SMLCONTEXT::ListLine ( const SMLMACHINEINST c,
bool  bIgnoreBad,
bool  bMarkIt,
MISTRING buf 
)

Function used by List() and by the debugger.

(If debugger becomes a friend class, this function can become private)

SMLFLAG* SMLCONTEXT::LookupEnumList ( char *  name  ) 

non-const version of above needed for historical purposes

SMLFLAG* SMLCONTEXT::LookupEnumList ( const char *  name  ) 

Lookup the array of SMLFLAGs given the name of an enum list Mostly internal.

May become private

ERRVALUE SMLCONTEXT::MemAlloc ( void **  pRet,
UINT32  size 
)

Allocate memory.

Very similar to MmAlloc(), but this one keeps track of the allocated memory and it gets freed when the context is destroied. It is also optimized to handle lots of requests for little chunks of memory. IMPORTANT! Memory allocated with this method MUST be freed with the MemFree() method. Freeing it with MmFree() or free() will result in a painful death. This should NOT be used to allocate anything returned by an SML function or class member.

ERRVALUE SMLCONTEXT::MemAllocC ( void **  pRet,
UINT32  size 
)

Allocate and clear memory.

Very similar to MmAllocC(), but this one keeps track of the allocated memory and it gets freed when the context is destroied. It is also optimized to handle lots of requests for little chunks of memory. IMPORTANT! Memory allocated with this method MUST be freed with the MemFree() method. Freeing it with MmFree() or free() will result in a painful death.

void SMLCONTEXT::MemFree ( void *  ptr  ) 

Free memory.

IMPORTANT! This function must only be used to free memory allocted with the SMLCONTEXT::MemAlloc() and SMLCONTEXT::MemAllocC() methods. Attempting to free other memory will result in a painful death. Attempting to free a NULL pointer is ignored. Unlike MmFree, this does NOT set the pointer to NULL for you.

int SMLCONTEXT::ObjectAlloc ( SMLTINOBJECT **   ) 

Allocate an SMLTINOBJECT.

int SMLCONTEXT::ObjectAlloc ( SMLCADOBJECT **   ) 

Allocate an SMLCADOBJECT.

int SMLCONTEXT::ObjectAlloc ( SMLVECTOROBJECT **   ) 

Allocate an SMLVECTOROBJECT.

int SMLCONTEXT::ObjectAlloc ( SMLRASTEROBJECT **   ) 

Allocate an SMLRASTEROBJECT.

SMLOBJECT* SMLCONTEXT::ObjectAlloc ( SMLSTYPE  stype  ) 

Allocate any kind of SMLOBJECT.

int SMLCONTEXT::Optimize (  ) 

byte-code optimizer.

This is automatically called by Parse(). However, if you cal GetUnindexedFieldList() after Parse() and decide to index something, you should call Optimize() again to get the query to actually use the index.

void SMLCONTEXT::OutstandingDestroysDec (  ) 

Decrement the number of outstanding XtDestroy callbacks which refer to this context.

int SMLCONTEXT::OutstandingDestroysGet (  )  const

Return the number of outstanding XtDestroy callbacks which refer to this context.

void SMLCONTEXT::OutstandingDestroysInc (  ) 

Increment the number of outstanding XtDestroy callbacks which refer to this context.

int SMLCONTEXT::Parse ( int  segnum,
const MIUNICODE str,
UINT32  flags = 0 
)

Parse a query.

int SMLCONTEXT::PrivDataIndexAlloc (  ) 

Allocate a private data index.

This should only be called once per module and kept in a static variable. You use when you call GetPrivData() and SetPrivData()

void SMLCONTEXT::RecycleStrings ( bool  FreeStringsInCodeToo = false  ) 

Do garbage collection on string pool.

Runs through the pool of strings and frees any which are no longer referenced by any symbols or code. Since strings are refcounted, this should be unnecessary, but since the refcount isn't automatic, its error prone. This prevents leaks.

static void SMLCONTEXT::RegisterFunctionList ( const SMLFUNCINSTALLER FuncList  )  [static]

Register a list of function installers to be installed for any context, This may be called on program startup.

static void SMLCONTEXT::RegisterMinimalFunctionList ( const SMLFUNCINSTALLER FuncList  )  [static]

Register a list of function installers to be installed for any context, This may be called on program startup.

void SMLCONTEXT::RegisterObjectCloseFunc ( SMLSTYPE  stype,
int(*)(SMLCONTEXT *, SMLOBJECT *)  func 
)

Registers the function to call to close an object type Would be done through virtual destructors on SMLOBJECT derived classes if we could do that.

void SMLCONTEXT::Release (  ) 

COM-like AddRef method An SMLCONTEXT is not a COM object, but uses AddRef/Release symantics.

Calling Release() may actually destroy the SML context if the caller was holding the last reference

int SMLCONTEXT::ResolveClassMembers ( FILE *  MissingClassFile = NULL  ) 

Scans all functions and classes to make sure the classes their members and parameters refer to are known.

If the MissingClassFile paremeter is given, any errors will be written out to that file. Note: after 20-Nov-06, nothing wil be using this outside rvcsys (they've all been modified to call CheckForClassMemberErrors instead) and the MissingClassFile parameter won't be needed on this method

int SMLCONTEXT::Run ( int  segnum,
UINT32  flags = 0 
)

Run is used for normal SML script.

Not currently SML Layers in display Never for any kind of query or geoformula

Possible flags: SMLRUN_StayResident -- Don't dispose of variables allocated within the script when the script exits. They will be disposed of when the context is destroied.

int SMLCONTEXT::SegmentCreate ( SMLUSAGE  usage,
ELEMTYPE  ElemType = ELEMTYPE_Empty,
int  table = -1 
)

Create a query segment.

A context can have multiple segments, each with its own code. Keep in mind that the symbol table is shared between all segments in a context.

Returns:
a segment number or error code < 0
Note:
0 is a valid segment number.
Parameters:
usage  Usage
ElemType  ELEMTYPE_Xxxxx
table  Base table for pinmap queries

int SMLCONTEXT::SegmentDestroy ( int  segment  ) 

Destroy a segment.

void SMLCONTEXT::SetAbortOnError ( bool  value  ) 

Set the AbortOnError flag.

If set (which it is by default, then any built-in function that gets an error and calls SetErrorCode() will cause the script to abort and popup an error dialog. If cleared, the error will be noted but the script will go on and the script writer can check GetLastError() to see if there was an error.

void SMLCONTEXT::SetCancelCheckInterval ( double  seconds  ) 

Set the time in seconds between each cancel check.

void SMLCONTEXT::SetCancelFunc ( int(*)(SMLCONTEXT *, void *)  func,
void *  data 
)

Set the function to check cancel.

void SMLCONTEXT::SetCaseSensitiveStrings ( bool  sensitive = true  ) 

Set whether or not string comparisons are case sensitive The default is true.

Note, this is NOT for symbol name comparisons

void SMLCONTEXT::SetConsole ( CONSOLE *  console  ) 

Set the console handle. This is done by the editor.

void SMLCONTEXT::SetDebugger ( SMLDEBUG *  debug  ) 

void SMLCONTEXT::SetDispInfo ( const DISPLAYINFO info  ) 

Set display info.

This has to be done outside the DLL

int SMLCONTEXT::SetErrorCode ( int  code  ) 

Set an error condition (and maybe abort the script).

By default, this will also cause the script to abort, but the script author can override that by setting _context.AbortOnError = 0 and use GetLastError() to check for errors.

int SMLCONTEXT::SetErrorCodeAndAbort ( int  code  ) 

Set an error condition (and abort script).

This WILL cause the script to abort

void SMLCONTEXT::SetErrorMessageForce ( MIUNICODE s  ) 

Used for parse errors (qqerrorext).

void SMLCONTEXT::SetNeedLineNumbersInCode ( int  val  ) 

Called by the editor when debugger is activated/deactivated.

void SMLCONTEXT::SetParentWidget ( MDLGPARENT  widget  ) 

Set the parent widget to use for popping up dialogs and such.

ERRVALUE SMLCONTEXT::SetParmError ( int  parmnum,
int  errcode = EBadFuncParm,
const MIUNICODE funcname = 0 
)

Set an error code for a function argument.

Parameter numbers start at 0. If errcode is omitted, EBadFuncParm will be used If funcname is omitted, the current function name will be used Returns the error code passed in

Parameters:
parmnum  Parameter, 0-based

void SMLCONTEXT::SetParserWarningLevel ( int  level  ) 

Set the level for parser warnings.

0 = none, 1 = Warn about deprecated function/class usage 2 = Warn about unindexed fields 3 = Warn about things that would cause errors on "strict" syntax checking

void SMLCONTEXT::SetPrivData ( int  pindex,
SMLDEVPRIVATE pdata 
)

Turns ownership of the pointer over to the context.

Pointer will be deleted when the context is destroied.

void SMLCONTEXT::SetScriptFilePath ( const FILEPATH filepath  ) 

Set the script filename Use if the script is not in an RVC object.

void SMLCONTEXT::SetScriptObjItem ( const RVC::OBJITEM objitem  ) 

ERRVALUE SMLCONTEXT::SetSegment ( int  segnum  ) 

Set segment to be parsed or executed.

void SMLCONTEXT::SetSegmentXMLNode ( int  segnum,
const XMLNODE node 
)

Keep track of the XMLNODE this segment was parsed from.

This is used to identify scripts from an XML <script> tag so that we don't parse the same tag twice.

UINT32 SMLCONTEXT::SetStatusBits ( UINT32  bits  ) 

Set one or more status bits.

void SMLCONTEXT::SetStatusContext ( STATUSCONTEXT status  ) 

Set the STATUSCONTEXT.

int SMLCONTEXT::SetupObjectDatabase ( SMLOBJECT obj,
RVC::FILEHANDLE *  filehandle,
RVC::DATABASEHANDLE *  dbhandle,
SMLELEMDATA *  ElemData,
ELEMTYPE  ElemType,
const RVC::CREDENTIALS Credentials,
bool  fromcb = false 
)

Used internally to setup the database.

void SMLCONTEXT::SetUsage ( int  Segment,
SMLUSAGE  usage 
)

Set the usage for this script.

Allows parser to warn or give an error if user tries to use a script for the wrong thing

void SMLCONTEXT::SetXMLDoc ( XMLDOC doc  ) 

Set the XMLDOC that this script was parsed from, if any.

Note, the SML context then "owns" the document pointer and will delete it when it's done.

int SMLCONTEXT::Stop (  ) 

Called internally to make the script exit and notify the parent.

Old version without parameters, still need to export for backward compatibility. Forces CanDestroyContext to true. This version CAN NOT be called from within another method in SMLCONTEXT.

int SMLCONTEXT::Stop ( bool  bCanDestroyContext  ) 

Called internally to make the script exit and notify the parent.

If called from within a method, we have to set bCanDestroyContext to false or the calling context may be destroied before we return to it.

SMLSTRING* SMLCONTEXT::StringAlloc ( const MIUNICODE str  ) 

Allocate an SMLSTRING (MIUNICODE*).

SMLSTRING* SMLCONTEXT::StringAlloc ( const STRUTF8 str  ) 

Allocate an SMLSTRING (STRUTF8).

SMLSTRING* SMLCONTEXT::StringAlloc ( const MISTRING str  ) 

Allocate an SMLSTRING (MISTRING).

SMLSTRING* SMLCONTEXT::StringAlloc ( const UINT8 str  ) 

Allocate an SMLSTRING (UINT8*).

Assumes UTF8

SMLSTRING* SMLCONTEXT::StringAlloc ( const char *  str  ) 

Allocate an SMLSTRING (char*).

Assumes ISO-2022

void SMLCONTEXT::StringFree ( SMLSTRING  ) 

Free an SMLSTRING.

static int SMLCONTEXT::STYPEFlags ( SMLSTYPE  stype  )  [static]

Get the STYPEFlags for a given STYPE.

This gets used in 2 places. When checking parameters, it's used to see if a symbol is an STYPE_ObjSym. If it is but not the kind we want, we cast it. It's also used after a function call to see if the parameter was an ObjSym and if it was a temp object, free it. Not currently used for anything else, so the contents are not that important except for the ones that have ObjSym set.

static char* SMLCONTEXT::STYPEtoString ( SMLSTYPE  stype  )  [static]

convet an SMLSTYPE into a string for display purposes.

Note, these are not i18n-able on purpose. SML keywords cannot be translated

static int SMLCONTEXT::STYPEToTokenVal ( SMLSTYPE  stype  )  [static]

Convert STYPE_Xxxx to the token value as assigned by YACC.

SMLSYMBOL* SMLCONTEXT::TempObjectSymbolAlloc ( SMLSTYPE  stype  ) 

void SMLCONTEXT::TempObjectSymbolFree ( SMLSYMBOL  ) 

int SMLCONTEXT::TestCancelOnce (  ) 

Call the test_cancel function.

Returns:
1 if we should cancel
Note:
If HasCancelFunc() returns 0, do NOT call this function. For effeciancy, this function won't check and would end up calling through a NULL pointer.

bool SMLCONTEXT::TestClass ( const SMLCLASS GivenClass,
const SMLCLASS NeededClass 
) const

Check to see if a class is derived from another class.

(internal use by the parser)

bool SMLCONTEXT::TestClass ( const char *  GivenClassName,
const SMLCLASS NeededClass 
) const

Check to see if a class is derived from another class.

(internal use by the parser)

static SMLSTYPE SMLCONTEXT::TokenValToSTYPE ( int  tval  )  [static]

Convert a token value as assigned by YACC to an STYPE_Xxxx.

void SMLCONTEXT::VMExecute ( SMLMACHINEINST pc  ) 

int SMLCONTEXT::VMReset (  ) 


The documentation for this class was generated from the following file:
Generated on Thu Apr 26 04:12:28 2007 for TNTsdk by  doxygen 1.5.2