![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cScriptableInterface.h>
Public Types | |
enum | P_TYPE_ { P_QTY } |
< if the InterfaceDef is itself an interface. More... | |
Public Member Functions | |
virtual cScriptableInterfaceDefPtr _stdcall | get_ScriptInterfaceDef () const |
cScriptableInterfaceDef (const TYPEINFO_t &TypeInfo, const ATOMCHAR_t *pszName, cScriptableProp *pProps, cScriptableMethod *pMethods, cScriptableInterfaceDef *pSubInterface, const ATOMCHAR_t *pszHelp) | |
virtual | ~cScriptableInterfaceDef () |
virtual bool | isValidCheck () const noexcept |
< memory allocation and structure definitions are valid. More... | |
const ATOMCHAR_t * | get_Name () const noexcept |
SCRIPTINTERFACEID_t | get_InterfaceID () const noexcept |
SCRIPTPROPID_t | get_MethodQty () const noexcept |
virtual cScriptableMethod * | GetMethodPtr (SCRIPTPROPID_t index) const noexcept |
virtual SCRIPTPROPID_t | GetMethodIndex (const cScriptableMethod *pMethod) const |
SCRIPTPROPID_t | FindMethodIndex (const ATOMCHAR_t *pszName) const |
cScriptableMethod * | FindMethodPtrI (const ATOMCHAR_t *pszName) const |
SCRIPTPROPID_t | get_PropQty () const |
virtual cScriptableProp * | GetPropPtr (SCRIPTPROPID_t index) const |
virtual SCRIPTPROPID_t | GetPropIndex (const cScriptableProp *pProp) const |
SCRIPTPROPID_t | FindPropIndex (const ATOMCHAR_t *pszName) const |
cScriptableProp * | FindPropPtrI (const ATOMCHAR_t *pszName) const |
bool | SetMethodPrivLevel (const ATOMCHAR_t *pszMethod, PLEVEL_TYPE ePrivLevel) |
Adjust a privilege level for a method of this class. More... | |
bool | IsInterfaceInit () const |
HRESULT | SerializeOutput (cStreamOutput &out, PLEVEL_TYPE ePrivLevel) const |
virtual void | InitScriptInterfaceDef () |
void | InitSubInterfaces () |
Manage all my sub-interfaces. More... | |
bool | HasSubInterface (const cScriptableInterfaceDef *pInterfaceDef) const |
bool | HasInterface (const cScriptableInterfaceDef *pInterfaceDef) const |
void | AddSubInterfaceProps (cScriptableInterfaceDef *pInterface) |
void | AddSubInterfaces (cScriptableInterfaceDef *pSubInterface) |
search All sub classes as well. More... | |
const cScriptableMethod * | FindMethodStr (const ATOMCHAR_t *pszName) const |
const cScriptableProp * | FindPropStr (const ATOMCHAR_t *pszName) const |
const cScriptableProp * | FindPropOrMethodStr (const ATOMCHAR_t *pszName) const |
const cScriptableMethod * | FindMethodHash (ATOMCODE_t nKey) const |
Find by string hash code. (assume no collisions) More... | |
const cScriptableProp * | FindPropHash (ATOMCODE_t nKey) const |
![]() | |
virtual | ~CObject () |
virtual void | AssertValid () const |
< memory allocation and structure definitions are valid. More... | |
virtual void | Serialize (cArchive &a) |
Public Attributes | |
const TYPEINFO_t & | m_TypeInfo |
The C++ typeid(class type) this refers to. (we could derive m_pszName?) MUST HAVE RTTI on! More... | |
const ATOMCHAR_t * | m_pszName |
Interface Name. More... | |
cScriptableInterfaceDef * | m_pSubInterface |
primary sub class. (can actually be multi(m_aSubInterfacesAll) or none(nullptr)) More... | |
const char * | m_pszHelp |
helpful description for human readers. More... | |
SCRIPTINTERFACEID_t | m_nInterfaceID |
enum id to define the class. similar to XOBJTIDX_TYPE ? More... | |
cArraySortPtrName< const cScriptableProp, ATOMCHAR_t > | m_aPropsAll |
cArraySortPtrName< const cScriptableMethod, ATOMCHAR_t > | m_aMethodsAll |
Complete list of all Methods. (includes sub class methods) More... | |
cArraySortPtrHash< const cScriptableProp, ATOMCODE_t > | m_aPropsAllHash |
We may search by hash code. More... | |
cArraySortPtrHash< const cScriptableMethod, ATOMCODE_t > | m_aMethodsAllHash |
cArraySortVal< SCRIPTINTERFACEID_t > | m_aSubInterfacesAll |
List of interfaces I'm based on (Already added to m_aMethodsAll and m_aPropsAll. More... | |
UINT | m_nInstances |
define get_ScriptInterfaceDef() More... | |
Static Public Attributes | |
static cScriptableProp | sm_Props [P_QTY+1] |
static cScriptableInterfaceDef | sm_ScriptInterfaceDef |
Protected Attributes | |
bool | m_bInitInterface |
has this been synchronized with the base classes. More... | |
SCRIPTPROPID_t | m_iPropQty |
get_PropQty() More... | |
SCRIPTPROPID_t | m_iMethodQty |
get_MethodQty() More... | |
Simple Interface Definition Description Metadata. Interface Definition plus
GrayLib::cScriptableInterfaceDef::cScriptableInterfaceDef | ( | const TYPEINFO_t & | TypeInfo, |
const ATOMCHAR_t * | pszName, | ||
cScriptableProp * | pProps, | ||
cScriptableMethod * | pMethods, | ||
cScriptableInterfaceDef * | pSubInterface, | ||
const ATOMCHAR_t * | pszHelp | ||
) |
Define an interface. If base for cScriptableInterfaceDynamic, pszName = nullptr
|
virtual |
void GrayLib::cScriptableInterfaceDef::AddSubInterfaceProps | ( | cScriptableInterfaceDef * | pInterface | ) |
void GrayLib::cScriptableInterfaceDef::AddSubInterfaces | ( | cScriptableInterfaceDef * | pSubInterface | ) |
search All sub classes as well.
Add a cScriptableInterfaceDef (and all its roots) to my props and methods
const cScriptableMethod * GrayLib::cScriptableInterfaceDef::FindMethodHash | ( | ATOMCODE_t | nKey | ) | const |
Find by string hash code. (assume no collisions)
|
inline |
|
inline |
const cScriptableMethod * GrayLib::cScriptableInterfaceDef::FindMethodStr | ( | const ATOMCHAR_t * | pszName | ) | const |
const cScriptableProp * GrayLib::cScriptableInterfaceDef::FindPropHash | ( | ATOMCODE_t | nKey | ) | const |
|
inline |
const cScriptableProp * GrayLib::cScriptableInterfaceDef::FindPropOrMethodStr | ( | const ATOMCHAR_t * | pszName | ) | const |
Find a prop or method of this class or it's subclasses. (by name)
|
inline |
const cScriptableProp * GrayLib::cScriptableInterfaceDef::FindPropStr | ( | const ATOMCHAR_t * | pszName | ) | const |
|
inlinenoexcept |
The interface enum id. This is only valid after cScriptableInterfaceMgr::Init()
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinevirtual |
Reimplemented in GrayLib::cScriptableInterfaceDynamic.
|
inlinevirtual |
Reimplemented in GrayLib::cScriptableInterfaceDynamic.
|
inlinevirtualnoexcept |
Reimplemented in GrayLib::cScriptableInterfaceDynamic.
|
inlinevirtual |
Reimplemented in GrayLib::cScriptableInterfaceDynamic.
|
inlinevirtual |
"GetProp" has _WIN32 define.
Reimplemented in GrayLib::cScriptableInterfaceDynamic.
bool GrayLib::cScriptableInterfaceDef::HasInterface | ( | const cScriptableInterfaceDef * | pInterfaceDef | ) | const |
bool GrayLib::cScriptableInterfaceDef::HasSubInterface | ( | const cScriptableInterfaceDef * | pInterfaceDef | ) | const |
Is pInterfaceDef a sub interface of me ?
|
virtual |
things that cannot be done at static construct time. Such as attaching multiple base classes etc.
Just init the simple class.
Reimplemented in GrayLib::cScriptableInterfaceTemplate< TYPE >, GrayLib::cScriptableInterfaceTemplate< GrayLib::cScriptContextObj >, GrayLib::cScriptableInterfaceTemplate< TYPE >, and GrayLib::cScriptableInterfaceTemplate< GrayLib::cScriptContextObj >.
void GrayLib::cScriptableInterfaceDef::InitSubInterfaces | ( | ) |
Manage all my sub-interfaces.
Go through all my props and methods and make sure my list of sub interfaces is good. harmless if already called.
|
inline |
Was cScriptableInterfaceMgr::InitInterfaces() called ?
|
virtualnoexcept |
< memory allocation and structure definitions are valid.
NOT in MFC so use COBJECT_IsValidCheck to call.
Reimplemented from Gray::CObject.
HRESULT GrayLib::cScriptableInterfaceDef::SerializeOutput | ( | cStreamOutput & | out, |
PLEVEL_TYPE | ePrivLevel | ||
) | const |
Send the interface definition out to a stream. base interface info. read by cScriptableInterfaceDynamic serialize the interace available to this ePrivLevel. i could read or write.
bool GrayLib::cScriptableInterfaceDef::SetMethodPrivLevel | ( | const ATOMCHAR_t * | pszMethod, |
PLEVEL_TYPE | ePrivLevel | ||
) |
Adjust a privilege level for a method of this class.
Set the Write/Exec privilege level for the method by name set privileges on props as well?
cArraySortPtrName<const cScriptableMethod, ATOMCHAR_t> GrayLib::cScriptableInterfaceDef::m_aMethodsAll |
Complete list of all Methods. (includes sub class methods)
cArraySortPtrHash<const cScriptableMethod, ATOMCODE_t> GrayLib::cScriptableInterfaceDef::m_aMethodsAllHash |
cArraySortPtrName<const cScriptableProp, ATOMCHAR_t> GrayLib::cScriptableInterfaceDef::m_aPropsAll |
High level names override low level names. Complete list of all Props. (includes sub class props)
cArraySortPtrHash<const cScriptableProp, ATOMCODE_t> GrayLib::cScriptableInterfaceDef::m_aPropsAllHash |
We may search by hash code.
cArraySortVal<SCRIPTINTERFACEID_t> GrayLib::cScriptableInterfaceDef::m_aSubInterfacesAll |
List of interfaces I'm based on (Already added to m_aMethodsAll and m_aPropsAll.
|
protected |
has this been synchronized with the base classes.
|
protected |
|
protected |
UINT GrayLib::cScriptableInterfaceDef::m_nInstances |
define get_ScriptInterfaceDef()
Qty of instances (objects) created of this interface type
SCRIPTINTERFACEID_t GrayLib::cScriptableInterfaceDef::m_nInterfaceID |
enum id to define the class. similar to XOBJTIDX_TYPE ?
cScriptableInterfaceDef* GrayLib::cScriptableInterfaceDef::m_pSubInterface |
primary sub class. (can actually be multi(m_aSubInterfacesAll) or none(nullptr))
const char* GrayLib::cScriptableInterfaceDef::m_pszHelp |
helpful description for human readers.
const ATOMCHAR_t* GrayLib::cScriptableInterfaceDef::m_pszName |
Interface Name.
const TYPEINFO_t& GrayLib::cScriptableInterfaceDef::m_TypeInfo |
The C++ typeid(class type) this refers to. (we could derive m_pszName?) MUST HAVE RTTI on!
|
static |
|
static |