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

#include <cScriptableInterface.h>

Inheritance diagram for GrayLib::cScriptableProp:
GrayLib::cScriptablePropDynamic

Public Member Functions

void InitProp ()
 
const ATOMCHAR_tget_Name () const noexcept
 
ATOMCODE_t get_HashCode () const noexcept
 
StrLen_t get_NamePropLen () const
 
cAtomRef get_NamePropA () const
 
bool IsPropFlags (CSCRIPTPROP_MASK_t wFlags) const noexcept
 
bool isFunction () const noexcept
 
bool isMethod () const noexcept
 
bool isProp () const noexcept
 
bool isDeprecated () const noexcept
 
int get_NumArgs () const noexcept
 
bool HasNoArgs () const noexcept
 
bool HasKnownArgs () const noexcept
 
bool HasPrivLevelRead (PLEVEL_TYPE ePrivLevel) const noexcept
 
bool HasPrivLevelWrite (PLEVEL_TYPE ePrivLevel) const noexcept
 
bool isValidProp () const noexcept
 
SCRIPTINTERFACEID_t get_InterfaceID () const
 id the interface this belongs to More...
 
SCRIPTPROPID_t get_PropIndex () const
 the index of the prop in the interface. More...
 
SCRIPTPROPID_t get_MethodIndex () const
 
HRESULT SerializeOutput (cStreamOutput &file, PLEVEL_TYPE ePrivLevel)
 
bool GetElementVal (const void *pBaseInst, OUT cVariant &vValRet) const
 
bool SetElementVal (void *pBaseInst, const cVariant &vVal) const
 
HRESULT SetElementCheck (void *pBaseInst, const cVariant &vVal) const
 
VARTYPE_TYPE get_ElementType () const
 
HRESULT ScriptWrite (IScriptableSetter *pScript, const void *pBaseInst) const
 
HRESULT ScriptRead (IScriptableGetter *pScript, void *pBaseInst) const
 

Static Public Member Functions

static BYTE GetARGS (CSCRIPTPROP_MASK_t flag) noexcept
 
static bool isNOARGS (CSCRIPTPROP_MASK_t flag) noexcept
 

Public Attributes

cStructNamedElem m_a
 (key,type,offset,extra) More...
 
CSCRIPTPROP_MASK_t m_wFlags
 CSCRIPTPROP_RETNUL (apply slightly diff to cScriptableMethod, cScriptableMethod, cScriptableMethod. More...
 
BYTE m_PrivLevelWrite
 What PLEVEL_TYPE required to write this prop or exec/invoke this method. More...
 
BYTE m_PrivLevelRead
 What PLEVEL_TYPE required to read this prop. (does not apply to methods) More...
 
const ATOMCHAR_tm_pszHelp
 short piece of help text on this prop/method. CSCRIPT_PROP_HELP More...
 
UINT_PTR m_nMethodStub
 just identifies it as a method or not. although m_PrivLevelRead==PLEVEL_QTY does as well. More...
 
cScriptableInterfaceDefm_pInterfaceDef
 point back to my root class. (not used for context functions) More...
 
ATOMCODE_t m_nHashCode
 The cAtomRef hash = StrT::GetHashCode32(m_a.key) (can't init this at static time. do it later InitProp()) More...
 

Detailed Description

metadata to define a property or method of a cScriptableInterfaceDef. { key, type, offset, extra, flags, plevelwrite, plevelread, help, method, interface } StrT::k_LEN_MAX_KEY

Member Function Documentation

◆ get_ElementType()

VARTYPE_TYPE GrayLib::cScriptableProp::get_ElementType ( ) const
inline

◆ get_HashCode()

ATOMCODE_t GrayLib::cScriptableProp::get_HashCode ( ) const
inlinenoexcept

If we want to sort by (or reference by) 32 bit hash code. (NOT Atom id?)

◆ get_InterfaceID()

SCRIPTINTERFACEID_t GrayLib::cScriptableProp::get_InterfaceID ( ) const

id the interface this belongs to

◆ get_MethodIndex()

SCRIPTPROPID_t GrayLib::cScriptableProp::get_MethodIndex ( ) const
inline

What Method inside my interface is this ?

◆ get_Name()

const ATOMCHAR_t* GrayLib::cScriptableProp::get_Name ( ) const
inlinenoexcept

Array sorted by name.

◆ get_NamePropA()

cAtomRef GrayLib::cScriptableProp::get_NamePropA ( ) const

◆ get_NamePropLen()

StrLen_t GrayLib::cScriptableProp::get_NamePropLen ( ) const

◆ get_NumArgs()

int GrayLib::cScriptableProp::get_NumArgs ( ) const
inlinenoexcept

requires at least 1 arg for this Prop or method?

◆ get_PropIndex()

SCRIPTPROPID_t GrayLib::cScriptableProp::get_PropIndex ( ) const
inline

the index of the prop in the interface.

What Prop inside my interface is this ?

◆ GetARGS()

static BYTE GrayLib::cScriptableProp::GetARGS ( CSCRIPTPROP_MASK_t  flag)
inlinestaticnoexcept

Qty of arguments expected. Was CSCRIPTPROP_ARGS()

◆ GetElementVal()

bool GrayLib::cScriptableProp::GetElementVal ( const void *  pBaseInst,
OUT cVariant vValRet 
) const
inline

Using cStructNamedElem and pBaseInst try to get the actual value of the prop.

◆ HasKnownArgs()

bool GrayLib::cScriptableProp::HasKnownArgs ( ) const
inlinenoexcept

requires x args (may be 0)

◆ HasNoArgs()

bool GrayLib::cScriptableProp::HasNoArgs ( ) const
inlinenoexcept

No args allowed at all!

◆ HasPrivLevelRead()

bool GrayLib::cScriptableProp::HasPrivLevelRead ( PLEVEL_TYPE  ePrivLevel) const
inlinenoexcept

◆ HasPrivLevelWrite()

bool GrayLib::cScriptableProp::HasPrivLevelWrite ( PLEVEL_TYPE  ePrivLevel) const
inlinenoexcept

Or invoke method.

◆ InitProp()

void GrayLib::cScriptableProp::InitProp ( )

Called when the interface is init

◆ isDeprecated()

bool GrayLib::cScriptableProp::isDeprecated ( ) const
inlinenoexcept
Note
These MUST be static. since Send_PropsI relies on client/server being in sync

◆ isFunction()

bool GrayLib::cScriptableProp::isFunction ( ) const
inlinenoexcept

global function = not a method.

◆ isMethod()

bool GrayLib::cScriptableProp::isMethod ( ) const
inlinenoexcept

◆ isNOARGS()

static bool GrayLib::cScriptableProp::isNOARGS ( CSCRIPTPROP_MASK_t  flag)
inlinestaticnoexcept

recommended number of args.

◆ isProp()

bool GrayLib::cScriptableProp::isProp ( ) const
inlinenoexcept

◆ IsPropFlags()

bool GrayLib::cScriptableProp::IsPropFlags ( CSCRIPTPROP_MASK_t  wFlags) const
inlinenoexcept

◆ isValidProp()

bool GrayLib::cScriptableProp::isValidProp ( ) const
inlinenoexcept

For ASSERT on construction.

◆ ScriptRead()

HRESULT GrayLib::cScriptableProp::ScriptRead ( IScriptableGetter pScript,
void *  pBaseInst 
) const

If read only don't read it !

◆ ScriptWrite()

HRESULT GrayLib::cScriptableProp::ScriptWrite ( IScriptableSetter pScript,
const void *  pBaseInst 
) const

If read only don't write it !

◆ SerializeOutput()

HRESULT GrayLib::cScriptableProp::SerializeOutput ( cStreamOutput file,
PLEVEL_TYPE  ePrivLevel 
)

assume we don't have to write the interface id

◆ SetElementCheck()

HRESULT GrayLib::cScriptableProp::SetElementCheck ( void *  pBaseInst,
const cVariant vVal 
) const
inline

Using cStructNamedElem and pBaseInst try to set the actual value of the prop. check for value not changing.

◆ SetElementVal()

bool GrayLib::cScriptableProp::SetElementVal ( void *  pBaseInst,
const cVariant vVal 
) const
inline

Using cStructNamedElem and pBaseInst try to set the actual value of the prop.

Member Data Documentation

◆ m_a

cStructNamedElem GrayLib::cScriptableProp::m_a

(key,type,offset,extra)

Prop/Method name. with linkage into class/struct. NOT always used.

◆ m_nHashCode

ATOMCODE_t GrayLib::cScriptableProp::m_nHashCode

The cAtomRef hash = StrT::GetHashCode32(m_a.key) (can't init this at static time. do it later InitProp())

◆ m_nMethodStub

UINT_PTR GrayLib::cScriptableProp::m_nMethodStub

just identifies it as a method or not. although m_PrivLevelRead==PLEVEL_QTY does as well.

◆ m_pInterfaceDef

cScriptableInterfaceDef* GrayLib::cScriptableProp::m_pInterfaceDef

point back to my root class. (not used for context functions)

◆ m_PrivLevelRead

BYTE GrayLib::cScriptableProp::m_PrivLevelRead

What PLEVEL_TYPE required to read this prop. (does not apply to methods)

◆ m_PrivLevelWrite

BYTE GrayLib::cScriptableProp::m_PrivLevelWrite

What PLEVEL_TYPE required to write this prop or exec/invoke this method.

◆ m_pszHelp

const ATOMCHAR_t* GrayLib::cScriptableProp::m_pszHelp

short piece of help text on this prop/method. CSCRIPT_PROP_HELP

◆ m_wFlags

CSCRIPTPROP_MASK_t GrayLib::cScriptableProp::m_wFlags

CSCRIPTPROP_RETNUL (apply slightly diff to cScriptableMethod, cScriptableMethod, cScriptableMethod.

m_wFlags describes the args etc. Type it is likely to return. Number of required args. Max Number of optional args.


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