Added JSON.stringify and eval()
Nicer JSON indenting
Fixed function output in JSON
Added evaluateComplex
Fixed some reentrancy issues with evaluate/execute
voidreplaceWith(CScriptVar*newVar);///< Replace the Variable pointed to
voidreplaceWith(CScriptVar*newVar);///< Replace the Variable pointed to
voidreplaceWith(CScriptVarLink*newVar);///< Replace the Variable pointed to (just dereferences)
voidreplaceWith(CScriptVarLink*newVar);///< Replace the Variable pointed to (just dereferences)
@ -169,6 +170,7 @@ public:
~CScriptVar(void);
~CScriptVar(void);
CScriptVar*getReturnVar();///< If this is a function, get the result value (for use by native functions)
CScriptVar*getReturnVar();///< If this is a function, get the result value (for use by native functions)
voidsetReturnVar(CScriptVar*var);///< Set the result value. Use this when setting complex return data as it avoids a deepCopy()
CScriptVar*getParameter(conststd::string&name);///< If this is a function, get the parameter with the given name (for use by native functions)
CScriptVar*getParameter(conststd::string&name);///< If this is a function, get the parameter with the given name (for use by native functions)
CScriptVarLink*findChild(conststd::string&childName);///< Tries to find a child with the given name, may return 0
CScriptVarLink*findChild(conststd::string&childName);///< Tries to find a child with the given name, may return 0
@ -210,7 +212,7 @@ public:
voidtrace(std::stringindentStr="",conststd::string&name="");///< Dump out the contents of this using trace
voidtrace(std::stringindentStr="",conststd::string&name="");///< Dump out the contents of this using trace
std::stringgetFlagsAsString();
std::stringgetFlagsAsString();
voidgetJSON(std::ostringstream&destination);///< Write out all the JS code needed to recreate this script variable to the stream (as JSON)
voidgetJSON(std::ostringstream&destination, conststd::stringlinePrefix="");///< Write out all the JS code needed to recreate this script variable to the stream (as JSON)