![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cScriptableObj.h>
Public Member Functions | |
virtual | ~cScriptableObj () |
STDMETHOD_ (cScriptableInterfaceDefPtr, get_ScriptInterfaceDef)() const | |
STDMETHOD() | s_PropGet (const cScriptableProp *pProp, OUT cVariant &vValRet) override |
STDMETHOD() | s_PropPut (const cScriptableProp *pProp, const cVariant &vVal) override |
STDMETHOD() | s_Invoke (const cScriptableMethod *pMethod, const cVariant &vArgs, OUT cVariant &vValRet) override |
const cScriptableProp * | FindPropStr (const ATOMCHAR_t *pszPropName) const |
const cScriptableMethod * | FindMethodStr (const ATOMCHAR_t *pszPropName) const |
HRESULT | s_InvokeKey (const ATOMCHAR_t *pszMethodKey, const cVariant &vArgs, OUT cVariant &vValRet) |
STDMETHOD_ (cVariant, s_Exec)(const ATOMCHAR_t *pszMethodKey | |
STDMETHOD() | s_GetEnum (ITERATE_t i, OUT cStringA &rsPropName, OUT cVariant &rvValRet) override |
STDMETHOD() | s_GetByName (const ATOMCHAR_t *pszPropName, OUT cVariant &rvValRet) override |
STDMETHOD() | s_Put (const ATOMCHAR_t *pszPropName, const cVariant &vValSet) override |
void | s_LoadPropsCommandLine (cAppArgs &args) |
HRESULT | s_LoadPropsBase (IScriptableEnumerator &rProps) |
HRESULT | s_LoadPropVar (const ATOMCHAR_t *pszPropName, const cVariant &vVal) |
HRESULT | s_WritePropNULL (IScriptableSetter &s, const cScriptableProp *pProp) |
HRESULT | s_WriteProp (IScriptableSetter &s, const cScriptableProp *pProp) |
HRESULT | s_WritePropsClass (IScriptableSetter &s, const cScriptableInterfaceDef *pClass) |
HRESULT | s_WritePropsArray (IScriptableSetter &s, const cScriptableProp *pProps, IScriptableObj *pDefaultSkip=nullptr) |
STDMETHOD() | s_WriteProps (IScriptableSetter &s) |
STDMETHOD_ (cVariant, s_Get)(const ATOMCHAR_t *pszPropName) | |
cVariant | s_Get (const cScriptableProp &rProp) |
STDMETHOD_ (cString, s_GetStr)(const ATOMCHAR_t *pszPropName) | |
STDMETHOD_ (float, s_GetFloat)(const ATOMCHAR_t *pszPropName) | |
STDMETHOD() | GetTypeInfoCount (UINT *pctinfo) |
Static Public Member Functions | |
static HRESULT GRAYCALL | CopyAllProps (IScriptableSetter *pObjDest, IScriptableEnumerator &rProps, int iStart=0) |
Public Attributes | |
const cVariant & | vArgs = cVariant::k_VarNULL) |
A group or properties for a scriptable object. base class for cXObject but can be used alone for simpler objects. A bag of named properties that i can read. Add some functionality to support s_GetByName and s_GetEnum
|
inlinevirtual |
|
static |
Load a single record to pObj from rs. ASSUME FetchNext() has just been called if its a db. similar to s_LoadPropsDatabaseBase() i = 0 based;
const cScriptableMethod * GrayLib::cScriptableObj::FindMethodStr | ( | const ATOMCHAR_t * | pszPropName | ) | const |
const cScriptableProp * GrayLib::cScriptableObj::FindPropStr | ( | const ATOMCHAR_t * | pszPropName | ) | const |
STDMETHODIMP GrayLib::cScriptableObj::GetTypeInfoCount | ( | UINT * | pctinfo | ) |
IDispatch
cVariant GrayLib::cScriptableObj::s_Get | ( | const cScriptableProp & | rProp | ) |
helper for s_PropGet
helper for s_PropGet
|
override |
helper for s_PropGet
|
override |
helper for s_PropGet
|
inlineoverride |
HRESULT GrayLib::cScriptableObj::s_InvokeKey | ( | const ATOMCHAR_t * | pszMethodKey, |
const cVariant & | vArgs, | ||
OUT cVariant & | vValRet | ||
) |
helper for s_Invoke call s_Invoke with cScriptContext check.
HRESULT GrayLib::cScriptableObj::s_LoadPropsBase | ( | IScriptableEnumerator & | rProps | ) |
Load keys for the object from the current section pointer in a cScriptFileReader file.
void GrayLib::cScriptableObj::s_LoadPropsCommandLine | ( | cAppArgs & | args | ) |
parse the command line then load all the params here. args = cAppState::I().m_Args
HRESULT GrayLib::cScriptableObj::s_LoadPropVar | ( | const ATOMCHAR_t * | pszPropName, |
const cVariant & | vVal | ||
) |
Loading a prop from a script file. like s_Put() but with more options. Allow method calls as well if not a prop. e.g. PROPKEY=VAL
|
override |
use the struct info in cScriptableProp (cStructElem)(if supplied) to try to get the prop.
|
override |
use the struct info in cScriptableProp (cStructElem)(if supplied) to try to put the prop.
|
override |
helper for s_PropPut look up the pszPropName in the class list. call s_PropPut with cScriptContext checks
HRESULT GrayLib::cScriptableObj::s_WriteProp | ( | IScriptableSetter & | s, |
const cScriptableProp * | pProp | ||
) |
Write a single prop.
HRESULT GrayLib::cScriptableObj::s_WritePropNULL | ( | IScriptableSetter & | s, |
const cScriptableProp * | pProp | ||
) |
HRESULT GrayLib::cScriptableObj::s_WriteProps | ( | IScriptableSetter & | s | ) |
Write out all the props for this.
HRESULT GrayLib::cScriptableObj::s_WritePropsArray | ( | IScriptableSetter & | s, |
const cScriptableProp * | pProps, | ||
IScriptableObj * | pDefaultSkip = nullptr |
||
) |
Write the props for just a particular interface.
HRESULT GrayLib::cScriptableObj::s_WritePropsClass | ( | IScriptableSetter & | s, |
const cScriptableInterfaceDef * | pClass | ||
) |
Write out all the props for this.
|
inline |
For test implementations.
GrayLib::cScriptableObj::STDMETHOD_ | ( | cString | , |
s_GetStr | |||
) | const |
GrayLib::cScriptableObj::STDMETHOD_ | ( | cVariant | , |
s_Exec | |||
) | const |
GrayLib::cScriptableObj::STDMETHOD_ | ( | float | , |
s_GetFloat | |||
) | const |
const cVariant& GrayLib::cScriptableObj::vArgs = cVariant::k_VarNULL) |