Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cScriptableObj Class Reference

#include <cScriptableObj.h>

Inheritance diagram for GrayLib::cScriptableObj:
IScriptableObj GrayGUI::cXDesktopMgr GrayLib::cXObject GrayMapData::CMultiDefBase GrayMapData::CTemplateDefBase GrayMapData::cMapBase GrayGUI::cXWindow GrayLib::cHttpScriptedProtocolStream GrayLib::cScriptContextObj GrayLib::cXObjDef GrayLib::cXObject2 GrayGUI::cXColorGrid GrayGUI::cXComboBox GrayGUI::cXImage GrayGUI::cXProgressBar GrayGUI::cXScrollBar GrayGUI::cXSpinCounter GrayGUI::cXStaticMultiScroll GrayGUI::cXWindowText GrayLib::cXObjPack GrayLib::cXObjPackChild GrayMapData::cMapPatch GrayX::GrayXRoot

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 cScriptablePropFindPropStr (const ATOMCHAR_t *pszPropName) const
 
const cScriptableMethodFindMethodStr (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 cVariantvArgs = cVariant::k_VarNULL)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ~cScriptableObj()

virtual GrayLib::cScriptableObj::~cScriptableObj ( )
inlinevirtual

Member Function Documentation

◆ CopyAllProps()

HRESULT GrayLib::cScriptableObj::CopyAllProps ( IScriptableSetter pObjDest,
IScriptableEnumerator rProps,
int  iStart = 0 
)
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;

◆ FindMethodStr()

const cScriptableMethod * GrayLib::cScriptableObj::FindMethodStr ( const ATOMCHAR_t pszPropName) const

◆ FindPropStr()

const cScriptableProp * GrayLib::cScriptableObj::FindPropStr ( const ATOMCHAR_t pszPropName) const

◆ GetTypeInfoCount()

STDMETHODIMP GrayLib::cScriptableObj::GetTypeInfoCount ( UINT *  pctinfo)

IDispatch

◆ s_Get()

cVariant GrayLib::cScriptableObj::s_Get ( const cScriptableProp rProp)

helper for s_PropGet

helper for s_PropGet

◆ s_GetByName()

HRESULT GrayLib::cScriptableObj::s_GetByName ( const ATOMCHAR_t pszPropName,
OUT cVariant rvValRet 
)
override

helper for s_PropGet

◆ s_GetEnum()

HRESULT GrayLib::cScriptableObj::s_GetEnum ( ITERATE_t  i,
OUT cStringA rsPropName,
OUT cVariant rvValRet 
)
override

helper for s_PropGet

◆ s_Invoke()

STDMETHOD() GrayLib::cScriptableObj::s_Invoke ( const cScriptableMethod pMethod,
const cVariant vArgs,
OUT cVariant vValRet 
)
inlineoverride

◆ s_InvokeKey()

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.

◆ s_LoadPropsBase()

HRESULT GrayLib::cScriptableObj::s_LoadPropsBase ( IScriptableEnumerator rProps)

Load keys for the object from the current section pointer in a cScriptFileReader file.

  • pContext = the context must be set to system for this !
    Note
    Does not check PLEVEL_TYPE security levels! ASSUME: SetObjStateLoaded will be called later.

◆ s_LoadPropsCommandLine()

void GrayLib::cScriptableObj::s_LoadPropsCommandLine ( cAppArgs args)

parse the command line then load all the params here. args = cAppState::I().m_Args

◆ s_LoadPropVar()

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

◆ s_PropGet()

HRESULT GrayLib::cScriptableObj::s_PropGet ( const cScriptableProp pProp,
OUT cVariant vValRet 
)
override

use the struct info in cScriptableProp (cStructElem)(if supplied) to try to get the prop.

◆ s_PropPut()

HRESULT GrayLib::cScriptableObj::s_PropPut ( const cScriptableProp pProp,
const cVariant vVal 
)
override

use the struct info in cScriptableProp (cStructElem)(if supplied) to try to put the prop.

◆ s_Put()

HRESULT GrayLib::cScriptableObj::s_Put ( const ATOMCHAR_t pszPropName,
const cVariant vValSet 
)
override

helper for s_PropPut look up the pszPropName in the class list. call s_PropPut with cScriptContext checks

◆ s_WriteProp()

HRESULT GrayLib::cScriptableObj::s_WriteProp ( IScriptableSetter s,
const cScriptableProp pProp 
)

Write a single prop.

◆ s_WritePropNULL()

HRESULT GrayLib::cScriptableObj::s_WritePropNULL ( IScriptableSetter s,
const cScriptableProp pProp 
)

◆ s_WriteProps()

HRESULT GrayLib::cScriptableObj::s_WriteProps ( IScriptableSetter s)

Write out all the props for this.

◆ s_WritePropsArray()

HRESULT GrayLib::cScriptableObj::s_WritePropsArray ( IScriptableSetter s,
const cScriptableProp pProps,
IScriptableObj pDefaultSkip = nullptr 
)

Write the props for just a particular interface.

◆ s_WritePropsClass()

HRESULT GrayLib::cScriptableObj::s_WritePropsClass ( IScriptableSetter s,
const cScriptableInterfaceDef pClass 
)

Write out all the props for this.

◆ STDMETHOD_() [1/5]

GrayLib::cScriptableObj::STDMETHOD_ ( cScriptableInterfaceDefPtr  ,
get_ScriptInterfaceDef   
) const
inline

For test implementations.

◆ STDMETHOD_() [2/5]

GrayLib::cScriptableObj::STDMETHOD_ ( cString  ,
s_GetStr   
) const

◆ STDMETHOD_() [3/5]

GrayLib::cScriptableObj::STDMETHOD_ ( cVariant  ,
s_Exec   
) const

◆ STDMETHOD_() [4/5]

GrayLib::cScriptableObj::STDMETHOD_ ( cVariant  ,
s_Get   
) const

◆ STDMETHOD_() [5/5]

GrayLib::cScriptableObj::STDMETHOD_ ( float  ,
s_GetFloat   
) const

Member Data Documentation

◆ vArgs

const cVariant& GrayLib::cScriptableObj::vArgs = cVariant::k_VarNULL)

The documentation for this class was generated from the following files: