represents a script file.
|
Public Member Functions |
| Script (IN(RString) cfgfile, IN(RScript) parentScript=Nil) |
| ~Script () |
RString | toString () |
| return a string representation of this object Object::toString() return getName() by default
|
RString | getFileName () |
RString | getScriptPath () |
RProps | getGlobals () |
RScript | getParentScript () |
bool | useStrict () |
void | useStrict (bool use) |
short | getCastFlags () |
| a combination of acdk::lang::dmi::ScriptVarCastFlags
|
void | setCastFlags (int castFlags) |
| a combination of acdk::lang::dmi::ScriptVarCastFlags
|
int | readEval (IN(RProps) props, int flags=PropsParentRead|PropsNoParentWrite) |
int | eval (IN(RString) text, IN(RProps) props, int flags=ScriptDefaultFlags) |
| evaluates a complete script
|
RDmiObject | evalExpr (IN(RString) text, IN(RProps) props, int flags=ScriptDefaultFlags) |
| evaluates not a sequence of statements, but a single expression
|
int | evalTemplate (IN(RString) text, IN(RProps) props, int flag=ScriptDefaultFlags) |
int | evalTemplate (IN(acdk::io::RFile) sourceFile, IN(RProps) props, int flag=ScriptDefaultFlags) |
void | assert (bool test) |
| this method will be called by scripts if the expression is false it write the asserting scripting line to ACDK_NLOG(acdk.cfgscript.Script.assert, Error)
|
void | assertTest (bool test) |
| same as assert(bool test) but write an info log entry in case of success
|
void | assertTrue (bool test, IN(RString) msg) |
void | testAssert (bool test) |
void | testAssertComment (bool test, IN(RString) msg) |
void | assertExists (IN(RProps) props, IN(RString) variable) |
bool | include (IN(RString) fname, bool noDuplicates=true, bool changeDir=false) |
| INOUT (RTokenizedSource) getTokenized() |
Static Public Member Functions |
void | initAsEnvProps (IN(RProps) scriptenv) |
| initialize properties as script environmnet
|
void | breakToDebug () |
| next statement will break to debugger
|
void | traceOn () |
| trace each executed line to System::out
|
void | traceOff () |
| don't trace each executed line
|
RString | getScriptBackTrace (bool withSourcePos=true, bool withLocals=false) |
RExecutionStack | getExecutionStack () |
void | clearStack () |
| if Script exits with an exception the execution stack is still active.
|
RString | getCfgScriptCommandLineHelp () |
RStringArray | parseCfgScriptOptions (IN(RStringArray) args, IN(RProps) envProps=Nil) |
| this method parses (and removes) the CfgScript command line options
|
acdk::lang::dmi::RDmiDelegate | createScriptDelegate (IN(RString) code) |
acdk::lang::dmi::RDmiDelegate | createScriptDelegate (const acdk::lang::dmi::ScriptVar &arg1, IN(RString) code) |
acdk::lang::dmi::RDmiDelegate | createScriptDelegate (const acdk::lang::dmi::ScriptVar &arg1, const acdk::lang::dmi::ScriptVar &arg2, IN(RString) code) |
acdk::lang::dmi::RDmiDelegate | createScriptDelegate (const acdk::lang::dmi::ScriptVar &arg1, const acdk::lang::dmi::ScriptVar &arg2, const acdk::lang::dmi::ScriptVar &arg3, IN(RString) code) |
acdk::lang::dmi::RDmiDelegate | createScriptDelegate (const acdk::lang::dmi::ScriptVar &arg1, const acdk::lang::dmi::ScriptVar &arg2, const acdk::lang::dmi::ScriptVar &arg3, const acdk::lang::dmi::ScriptVar &arg4, IN(RString) code) |
acdk::lang::dmi::RDmiDelegate | createScriptDelegate (const acdk::lang::dmi::ScriptVarArray &args, IN(RString) code) |
Public Attributes |
RProps | currentProps |
| script globals
|
Private Member Functions |
int | _readEval (IN(RProps) props, int flags) |
int | _readEval2 (IN(RProps) props, bool inplace) |
RString | _getCurrentAssertLine () |
Private Attributes |
RString | _filename |
RScript | _parentScript |
RStringArray | _alreadyIncluded |
RTokenizedSource | _tokenized |
bool | _useStrict |
short | _castFlags |
| a combination of ScriptVarCastFlags
|