#include <sml.h>
Public Member Functions | |
| void | AddNameAlias (const char *NewName, const char *OldName) |
| 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 |
| const SMLMACHINEINST * | GetCS () const |
| SMLMACHINEINST * | GetCSNonConst () const |
| void * | GetConsole () const |
| const SMLFUNC * | GetCurrentFunction () const |
| UNICODE * | GetCurrentFunctionName () const |
| int | GetDatabaseHandle (int ElemType) const |
| SMLSYMBOL * | GetDestObjectSymbol (int numargs, SMLARG *args, UINT8 *argtype, SMLSTYPE OutSTYPE, UINT32 flags) |
| const DISPLAYINFO * | GetDispInfo () const |
| int | GetErrorLine () const |
| int | GetExitOnError () const |
| SMLSYMBOL * | GetFieldSymbol (int table, int field) |
| SMLSYMBOL * | GetFieldSymbol (SMLSYMBOL *t, SMLSYMBOL *f) |
| SMLSYMBOL * | GetForEachRastSym () const |
| char * | GetFuncGroupName (int num) const |
| int | GetFunctionTypeList (char ***namep, int **typep) const |
| int | GetLastError (MISTRING &msg, INT32 *pos=0) |
| ERRVALUE | GetLastError (INT32 *pos=0) |
| SMLSTRING * | GetLastPoppedString () const |
| int | GetMainObject (FILEPATH &filepath, INT32 *inodep) const |
| int | GetNeedLineNumbersInCode () const |
| int | GetNumBreakPoints () const |
| int | GetNumFuncClasses () const |
| SMLOBJECT * | GetObjectList () const |
| const SMLMACHINEINSTRUCTION * | GetOpCodeData (int opcode) const |
| MDLGPARENT | GetParentWidget () const |
| void * | GetParentWidgetVoid () const |
| int | GetParserWarningLevel () const |
| const MISTRING & | GetParserWarnings () const |
| const SIMPLE_ARRAY< SMLFIELDDATA > & | GetUnindexedFieldList () const |
| void | SetParserWarningLevel (int level) |
| const SMLMACHINEINST * | GetPC () const |
| int | GetPCList (SMLMACHINEINST ***plist) |
| ERRVALUE | GetPCList (SIMPLE_ARRAY< const SMLMACHINEINST * > &plist) |
| const SMLSOURCEINFO * | GetSourceInfo (const SMLMACHINEINST *pc) const |
| const SMLPARSEPOS * | GetSourcePos (const SMLMACHINEINST *pc) const |
| bool | GetSourceLine (const SMLMACHINEINST *pc, MISTRING &mistr) const |
| SMLSYMBOL * | GetPrimaryKeySymbol (SMLSYMBOL *fk_sym) |
| int | GetPrimaryTable (int segment) const |
| XMLDOC * | GetXMLDoc () const |
| int | AppendPrintBuffer (const UNICODE *) |
| int | AppendPrintBuffer (const char *) |
| UNICODE * | GetPrintBuffer () const |
| const MISTRING & | GetPrintBufferMISTRING () const |
| char ** | GetPrintBufPtr () |
| SMLDEVPRIVATE * | GetPrivData (int pindex) const |
| int | GetProgBase () const |
| int | GetProgPtr () const |
| char * | GetRCSID (SMLSOURCEINFO *fni) |
| SMLCLASS * | GetRegisteredClassList () const |
| int | GetRootElemNum () const |
| int | GetRootElemType () const |
| const FILEPATH & | GetScriptFilePath () const |
| INT32 | GetScriptInode () const |
| int | GetSegmentDatabaseHandle (int segment) const |
| int | GetSegmentType (int segment=-1) const |
| int | GetSegmentUsage (int segment=-1) const |
| int | GetSegmentElemType (int segment=-1) const |
| const XMLNODE * | GetSegmentXMLNode (int segnum) const |
| int | GetSegmentByXMLNode (const XMLNODE *node) const |
| UINT32 | GetStatus () const |
| MSTATUSCONTEXT | GetStatusContext () const |
| SMLSYMBOL * | GetStdSym () const |
| SMLSYMBOL * | GetSymbol (const char *name) const |
| SMLSYMBOL * | GetSymbol (const UNICODE *name) const |
| int | GetSymbolTypeList (char ***namep, int **typep) const |
| SMLSYMBOL * | GetSymbolListFuncs (int group=0) const |
| SMLSYMBOL * | GetSymbolListGlobal (int level=0) const |
| SMLSYMBOL * | GetSymbolListLocal () const |
| SMLSYMBOL * | GetSymbolListPerm () const |
| int | GetSymbolNameList (int funcgroup, UNICODE ***names) const |
| int | GetSymbolNameList (int funcgroup, MISTRINGLIST &names, bool bIncludeAliases=true) const |
| SMLSYMBOL * | GetTableSymbol (int table) |
| void | SetArgError (int errcode, int argnum, const UNICODE *funcname=0) |
| void | SetCancelCheckInterval (double seconds) |
| void | SetCancelFunc (int(*func)(SMLCONTEXT *, void *), void *data) |
| void | SetCaseSensitiveStrings (bool sensitive=true) |
| void | SetConsole (void *console) |
| void | SetDebugger (SMLDEBUG *debug) |
| void | SetDebuggerCallback (void(*func)(SMLCONTEXT *context, void *DebugData), void *data) |
| void | SetDispInfo (const DISPLAYINFO &info) |
| int | SetErrorCode (int code) |
| void | SetErrorMessageForce (UNICODE *s) |
| void | SetFileHandle (int handle) |
| void | SetNeedLineNumbersInCode (int val) |
| void | SetParentWidget (MDLGPARENT widget) |
| void | SetPrivData (int pindex, SMLDEVPRIVATE *pdata) |
| void | SetScriptFilePath (const FILEPATH &filepath) |
| void | SetScriptInode (INT32 inode) |
| ERRVALUE | SetSegment (int segnum) |
| void | SetSegmentXMLNode (int segnum, const XMLNODE *node) |
| UINT32 | SetStatusBits (UINT32 bits) |
| void | SetStatusContext (MSTATUSCONTEXT status) |
| void | SetStatusFunc (void(*func)(), void *data) |
| void | SetXMLDoc (XMLDOC *doc) |
| ERRVALUE | AddObjectSymbol (const UNICODE *name, int fhandle, INT32 inode, SMLSYMBOL **symp, UINT32 flags=0) |
| ERRVALUE | AddObjectSymbol (const char *name, int fhandle, INT32 inode, SMLSYMBOL **symp, UINT32 flags=0) |
| ERRVALUE | AddObjectSymbol (const UNICODE *name, int ohandle, SMLSYMBOL **symp, UINT32 flags=0) |
| ERRVALUE | AddObjectSymbol (const char *name, int ohandle, SMLSYMBOL **symp, UINT32 flags=0) |
| void | AddOnExit (SMLONEXITDATA *data) |
| SMLSYMBOL * | AddSymbol (const UNICODE *name, SMLSTYPE stype) |
| SMLSYMBOL * | AddSymbol (const char *name, SMLSTYPE stype) |
| SMLSYMBOL * | AddClassSymbol (const UNICODE *name, char *classname, void *ptr) |
| SMLSYMBOL * | AddClassSymbol (const char *name, char *classname, void *ptr) |
| 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 () |
| void | CallFunction (SMLSYMBOL *func, SMLARG *args, int numargs, UINT8 *tlist, SMLARG *ret, UINT32 flags=0) |
| double | CallFunction (const char *name, ELEMTYPE elemtype, INT32 element=0) |
| double | CallFunction (const char *name, INT32 element=0) |
| void | ClearPrintBuffer () |
| UINT32 | ClearStatusBits (UINT32 bits) |
| void | CloseObjects () |
| bool | CurrentFunctionIsClassMethod () const |
| int | Destroy () |
| int | Evaluate (int segnum, INT32 element, int ElemType, void *valp) |
| int | Evaluate (int segnum, INT32 element, void *valp) |
| SMLGEOSTRUCT * | GeorefAlloc () |
| SMLGEOSTRUCT * | GeorefAlloc (bool bUseTempMem) |
| SMLGEOSTRUCT * | GeorefCopy (const SMLGEOSTRUCT *src) |
| SMLGEOSTRUCT * | GeorefCopy (const SMLGEOSTRUCT *src, bool bUseTempMem) |
| void | GeorefFree (SMLGEOSTRUCT *georef) |
| bool | HasBreakPoint (int offset) const |
| bool | HasCancelFunc () const |
| int | InstallClass (SMLCLASS *staticClass) |
| int | InstallEnum (const char *name, SMLFLAG *smlflags, UINT32 flags) |
| int | InstallEnum (const char *name, int(*func)(SMLCONTEXT *, void *, SMLFLAG **), void *funcdata, UINT32 flags) |
| int | InstallFunctionList (SMLFUNCINSTALLER *funclist) |
| int | InstallFunctions (const char *symclass, const SMLFUNC *vfuncs) |
| void | InstallSMLOnlyFunctions () |
| bool | IsBeingDestroied () const |
| void | List (FILE *file) |
| void | List (MISTRING &) |
| int | ListLine (const SMLMACHINEINST *c, bool bIgnoreBad, bool bMarkIt, MISTRING &buf) |
| int | ListLine (const SMLMACHINEINST *c, bool bIgnoreBad, bool bMarkIt, UNICODE *buf, int len) |
| SMLFLAG * | LookupEnumList (const char *name) |
| SMLFLAG * | LookupEnumList (char *name) |
| SMLOBJECT * | ObjectAlloc (SMLSTYPE stype) |
| int | ObjectAlloc (SMLRASTEROBJECT **) |
| int | ObjectAlloc (SMLVECTOROBJECT **) |
| int | ObjectAlloc (SMLCADOBJECT **) |
| int | ObjectAlloc (SMLTINOBJECT **) |
| int | ObjectAlloc (SMLREGIONOBJECT **) |
| int | Optimize () |
| void | OutstandingDestroysDec () |
| int | OutstandingDestroysGet () const |
| void | OutstandingDestroysInc () |
| int | Parse (int segnum, const UNICODE *str, UINT32 flags=0) |
| int | PrivDataIndexAlloc () |
| void | RecycleStrings (bool FreeStringsInCodeToo=false) |
| void | RegisterObjectCloseFunc (SMLSTYPE stype, int(*func)(SMLCONTEXT *, SMLOBJECT *)) |
| int | ResolveClassMembers (FILE *MissingClassFile=NULL) |
| int | Run (int segnum, UINT32 flags=0) |
| int | SegmentCreate (int qtype, int ElemType, int table=-1) |
| int | SegmentDestroy (int segment) |
| int | TestCancelOnce () |
| int | SetupObjectDatabase (SMLOBJECT *obj, int dbid, SMLELEMDATA *ElemData, int ElemType, RVCDBASEINFO *info, int infosize, bool fromcb=false) |
| int | Stop (bool bCanDestroyContext) |
| int | Stop () |
| SMLSTRING * | StringAlloc (const char *str) |
| SMLSTRING * | StringAlloc (const UINT8 *str) |
| SMLSTRING * | StringAlloc (const UNICODE *str) |
| void | StringFree (SMLSTRING *) |
| void * | TempMemAlloc (int size, UINT32 flags=0) |
| void | TempMemHandleFree (LINKEDLIST *list, SMLTEMPMEMHANDLE *handle) |
| int | TempMemMarkAsOffStack (void *ptr, UINT32 flags=0) |
| void | TempMemMarkAsOnStack (void *ptr, SMLCLASS *itemclass, UINT32 flags=0) |
| void * | TempMemRegister (void *ptr, void(*Free)(void *), UINT32 flags=0) |
| void * | TempMemRegister (void *ptr, UINT32 flags=0) |
| SMLSYMBOL * | TempObjectSymbolAlloc (SMLSTYPE stype) |
| void | TempObjectSymbolFree (SMLSYMBOL *) |
| void | VMExecute (SMLMACHINEINST *pc) |
| int | VMReset () |
| ERRVALUE | MemAlloc (void **pRet, UINT32 size) |
| ERRVALUE | MemAllocC (void **pRet, UINT32 size) |
| void | MemFree (void *ptr) |
Static Public Member Functions | |
| char * | GetOperator (int num) |
| char * | GetOperatorHelp (int num) |
| char * | GetOperatorDescription (int num) |
| char ** | GetOperatorList () |
| char * | STYPEtoString (SMLSTYPE stype) |
| int | STYPEFlags (SMLSTYPE stype) |
| int | STYPEToTokenVal (SMLSTYPE stype) |
| SMLSTYPE | TokenValToSTYPE (int tval) |
| int | CallbackAddGlobal (McbCallbackFunc func, void *cbdata, UINT32 reason) |
| int | CallbackRemoveGlobal (McbCallbackFunc func, void *cbdata, UINT32 reason) |
NOTE: This must follow the MicroImages rules for classes defined in a DLL. Mainly...
Definition at line 5452 of file sml.h.
|
||||||||||||||||
|
Add a class symbol to the context (char*) name. See details in the (UNICODE*) version of this method
|
|
||||||||||||||||
|
Add a class symbol to the context (UNICODE*) name. This would let you add, for example, a COLOR symbol for use in a query.
|
|
||||||||||||
|
Setup an alias for a class of function Exiting 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 |
|
||||||||||||||||||||
|
For an open object, (char*) name.
|
|
||||||||||||||||||||
|
For an open object, (UNICOCE*) name.
|
|
||||||||||||||||||||||||
|
Add symbol referring to object using 'char*' name.
|
|
||||||||||||||||||||||||
|
Add symbol referring to object using 'UNICODE*' name.
|
|
|
Add an OnExit entry to the OnExitList.
|
|
||||||||||||
|
Add a symbol to the context (char*) name.
|
|
||||||||||||
|
Add a symbol to the context (UNICODE*) name.
|
|
|
Append an ISO-2022 string to the print buffer.
|
|
|
Append a Unicode string to the print buffer.
|
|
|
Add a breakpoint at the current offset. (offset = pc - cs) |
|
|
Remove a breakpoint from the current offset. (offset = pc - cs) |
|
|
Toggle a breakpoint at the current offset. (offset = pc - cs) |
|
||||||||||||||||
|
Add a callback. For a list of possible callback reasons
|
|
||||||||||||||||
|
Add a callback to the Global callback list. For a list of possible callback reasons
|
|
||||||||||||||||
|
Remove a callback. For a list of possible callback reasons
|
|
||||||||||||||||
|
Remove a callback from the Global callback list. For a list of possible callback reasons
|
|
|
Call the callback list. For a list of possible callback reasons
|
|
|
Call the destructors symbols pointing to class data. This calls SMLSYMBOLL::DisposeOFContents() for all STYPE_ClassVar symbols |
|
||||||||||||
|
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.
|
|
||||||||||||||||
|
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.
|
|
||||||||||||||||||||||||||||
|
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) contesxt->CallFunction(func, args, 1, types, &ret); // Do the drawing here func = context->GetSymbol("OnDrawEnd"); if (func) contesxt->CallFunction(func, args, 1, types, &ret);
|
|
|
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. |
|
|
Clear one or more status bits.
|
|
|
Closes all open objects. This is done automatically when the script exits. |
|
|
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) |
|
|
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. |
|
||||||||||||||||
|
Evaluate a query for a given element Uses the element type given when the segment was created.
|
|
||||||||||||||||||||
|
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.
|
|
|
Allocate an SMLGEOSTRUCT. Code outside rvcapp.dll cannot construct SMLGEOSTRUCTs since the size of the struct is private This verion allows allocation with temporary memory. Would be implemented as just one function with a default of false, but old code will expect the parameterless version to be exported from the DLL, so we have to keep it around |
|
|
Allocate an SMLGEOSTRUCT. Code outside rvcapp.dll cannot construct SMLGEOSTRUCTs since the size of the struct is private |
|
||||||||||||
|
Copy an SMLGEOSTRUCT Would be implemented as just one function with a default of false, but old code will expect the parameterless version to be exported from the DLL, so we have to keep it around.
|
|
|
Copy an SMLGEOSTRUCT.
|
|
|
Free an SMLGEOSTRUCT.
|
|
||||||||||||||||||||||||
|
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. |
|
|
Get the array index base (normally 1, but can be overridden).
|
|
|
Return the time in seconds between each cancel check.
|
|
|
Return whether or not string comparisons should be case sensitive.
|
|
|
Get the size of the bytecode in memory.
|
|
|
Returns the console handle.
|
|
|
Get the current Code Segment (CS) (const).
|
|
|
Get the current Code Segment (CS) (non-const).
|
|
|
Return the SMLFUNC* of the current function. This is only valid while running, not parsing. |
|
|
Return the name of the current function. This is only valid while running, not parsing. This should return a (const UNICODE *), but not all the places that need it know about const yet. |
|
|
Get the database handle for a given element type Do NOT close this!
|
|
||||||||||||||||||||||||
|
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:
|
|
|
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 |
|
|
Returns the line of the last error.
|
|
|
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. |
|
||||||||||||
|
Return the SMLSYMBOL of a database field. This version only used by the parser. |
|
||||||||||||
|
Return the SMLSYMBOL of a database field.
|
|
|
Returns the current raster being processed by a "foreach" or NULL if none.
|
|
|
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).
|
|
||||||||||||
|
Returns function types and names for the "Insert Function" dialogs.
|
|
|
Returns the last error code, and (optionally) 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) |
|
||||||||||||
|
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) |
|
|
Retrieves the last SMLSTRING to be popped from the stack.
|
|
||||||||||||
|
Returns the filename/inode of the main object this query is for.
|
|
|
Will return true if the parser needs to emit opLINE codes for the debugger. (Used to interleave source and assembly) |
|
|
Returns the current number of breakpoints set in the debugger.
|
|
|
Get the number of function groups.
|
|