![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cScriptContext.h>
Public Types | |
enum | M_TYPE_ { M_QTY } |
typedef cExpressionContext | CSCRIPTABLE_SUPER_t |
![]() | |
enum | M_TYPE_ { M_QTY } |
Public Member Functions | |
cScriptContext (IAuthUser *pAuth=nullptr, cStreamOutput *pOutConsole=nullptr) | |
cScriptContext (IAuthUser *pAuth, cStreamOutput *pOutConsole, IXObject *pBaseObj) | |
cScriptContext (IAuthUser *pAuth, cStreamOutput *pOutConsole, IXObject *pBaseObj, PLEVEL_TYPE ePrivLevel) | |
cScriptContext (cScriptContext *pContextToDupe) | |
virtual | ~cScriptContext () |
virtual cScriptableInterfaceDefPtr _stdcall | get_ScriptInterfaceDef () const |
STDMETHOD() | s_InvokeExec (const cScriptableMethod *pFunc, const cVariant &vArgs, OUT cVariant &vValRet) |
virtual bool | isValidCheck () const noexcept override |
< memory allocation and structure definitions are valid. More... | |
cString | get_ContextName () const |
void | put_SrcAuth (IAuthUser *pAuth) noexcept |
IAuthUser * | get_SrcAuth () const noexcept |
void | put_SrcConsole (cStreamOutput *pOutConsole) |
cStreamOutput * | get_SrcConsole () const |
Client. More... | |
cScriptableObj * | get_SrcObj () const |
Attached m_pOutConsole is really a Client avatar char ? More... | |
PLEVEL_TYPE | get_ExecPrivLevel () const noexcept |
void | put_ExecPrivLevel (PLEVEL_TYPE ePrivLevel) noexcept |
void | put_ExecPrivLevelMin (PLEVEL_TYPE ePrivLevel=PLEVEL_Admin) noexcept |
cIUnkPtr< IXObject > | get_BaseObject () const noexcept |
void | put_BaseObject (IXObject *pObj) noexcept |
cString | get_BaseObjName () const |
virtual cScriptContext * | DupeContext (cScriptContext *pNew) const |
![]() | |
virtual | ~cExpressionContext () |
STDMETHOD() | s_InvokeExec (const cScriptableMethod *pFunc, const cVariant &vArgs, cVariant &vValRet) |
![]() | |
virtual | ~CObject () |
virtual void | AssertValid () const |
< memory allocation and structure definitions are valid. More... | |
virtual void | Serialize (cArchive &a) |
Public Attributes | |
cVarMap | m_ArgMap |
local variables and arguments for this context. NOT the same as function_name(args). More... | |
Static Public Attributes | |
static cScriptableMethod | sm_Methods [M_QTY+1] |
static cScriptableInterfaceDef | sm_ScriptInterfaceDef |
![]() | |
static cScriptableInterfaceDef | sm_ScriptInterfaceDef |
static cScriptableMethod | sm_Methods [M_QTY+1] |
Additional Inherited Members | |
![]() | |
cExpressionContext () | |
Current Context for some script execution. (base/default/this object + arguments + local variables + return value + authorization level + output console, etc)
GrayLib::cScriptContext::cScriptContext | ( | IAuthUser * | pAuth = nullptr , |
cStreamOutput * | pOutConsole = nullptr |
||
) |
GrayLib::cScriptContext::cScriptContext | ( | IAuthUser * | pAuth, |
cStreamOutput * | pOutConsole, | ||
IXObject * | pBaseObj | ||
) |
assuming this is always stack based, we can assume create/destruct will happen in order. NOT stack based in the case of m_pContextRoot.
GrayLib::cScriptContext::cScriptContext | ( | IAuthUser * | pAuth, |
cStreamOutput * | pOutConsole, | ||
IXObject * | pBaseObj, | ||
PLEVEL_TYPE | ePrivLevel | ||
) |
GrayLib::cScriptContext::cScriptContext | ( | cScriptContext * | pContextToDupe | ) |
Dupe previous context but don't copy m_ArgMap like DupeContext()
|
virtual |
|
virtual |
CIXObjPtr 'This' object in GrayScript Assume this is the root object if this is the default context.
cString GrayLib::cScriptContext::get_BaseObjName | ( | ) | const |
Readable name of the base object.
cString GrayLib::cScriptContext::get_ContextName | ( | ) | const |
readable name of the authorizing object.
|
inlinenoexcept |
We can temporarily get a higher privilege level for some ops.
|
inlinevirtual |
Reimplemented from GrayLib::cExpressionContext.
|
inlinenoexcept |
< Who caused this to run? (account) For security purposes.
cStreamOutput * GrayLib::cScriptContext::get_SrcConsole | ( | ) | const |
Client.
Get the current console for the context of this script exec.
Direct the text out to the log by default. Not typical.
cScriptableObj * GrayLib::cScriptContext::get_SrcObj | ( | ) | const |
Attached m_pOutConsole is really a Client avatar char ?
The m_pOutConsole can itself be some complex cScriptableObj. Overload this to provide some source world object ? (avatar char vs client)
|
inlineoverridevirtualnoexcept |
< memory allocation and structure definitions are valid.
NOT in MFC so use COBJECT_IsValidCheck to call.
Reimplemented from GrayLib::cExpressionContext.
|
inlinenoexcept |
This can change for a given context Assume this is the root object if this is the default context.
|
inlinenoexcept |
Change to a different exec privilege level. (>m_pAuth->get_PrivLevel()) typically used to raise privilege level temporarily for a script.
|
inlinenoexcept |
typically used to raise privilege level temporarily for a script.
|
inlinenoexcept |
Assign new authorization to the context. Change in account ?
|
inline |
Assign new output console to the context. what to do with error output.
HRESULT GrayLib::cScriptContext::s_InvokeExec | ( | const cScriptableMethod * | pFunc, |
const cVariant & | vArgs, | ||
OUT cVariant & | vValRet | ||
) |
Evaluate an identifier in an expression. Skip to the end of the identifier name (and args). Allow this to be overridden.
cVarMap GrayLib::cScriptContext::m_ArgMap |
local variables and arguments for this context. NOT the same as function_name(args).
|
static |
|
static |