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

#include <cScriptableInterface.h>

Inheritance diagram for GrayLib::cScriptableInterfaceMgr:
Gray::cSingleton< cScriptableInterfaceMgr > Gray::cSingletonStatic< TYPE > Gray::cSingletonRegister Gray::CObject Gray::cHeapObject Gray::IHeapObject

Public Member Functions

cScriptableInterfaceDefPtr GetInterfaceDef (SCRIPTINTERFACEID_t nInterfaceID) const
 
void InitInterfaceDefs ()
 
bool isInitInterfaces () const
 
bool SetMethodPrivLevel (const ATOMCHAR_t *pszMethod, PLEVEL_TYPE ePrivLevel)
 
SCRIPTINTERFACEID_t AddInterfaceDef (cScriptableInterfaceDef *pScriptInterface)
 
bool RemoveInterfaceDef (cScriptableInterfaceDef *pScriptInterface)
 
cScriptableInterfaceDefPtr FindInterfaceDef (const ATOMCHAR_t *pszName) const
 
void UpdateInterfaceProp (cScriptableProp *pProp)
 Late binding for dynamic props. (i.e. Attributes and Stats added ad hoc) More...
 
 UNITTEST_FRIEND (cScriptableInterface)
 
- Public Member Functions inherited from Gray::CObject
virtual ~CObject ()
 
virtual bool isValidCheck () const noexcept
 < memory allocation and structure definitions are valid. More...
 
virtual void AssertValid () const
 < memory allocation and structure definitions are valid. More...
 
virtual void Serialize (cArchive &a)
 
- Public Member Functions inherited from Gray::cHeapObject
 cHeapObject ()
 
virtual ~cHeapObject ()
 
bool IsValidInsideN (INT_PTR index) const
 
bool IsValidInsidePtr (void const *pTest) const
 
virtual size_t GetHeapStatsThis (OUT ITERATE_t &iAllocCount) const
 
virtual bool isValidCheck () const noexcept
 

Static Public Member Functions

static void GRAYCALL InitInterfaces ()
 
- Static Public Member Functions inherited from Gray::cSingleton< cScriptableInterfaceMgr >
static cScriptableInterfaceMgr *__stdcall get_Single ()
 
static TYPE2 *__stdcall get_SingleT ()
 
static cScriptableInterfaceMgr &__stdcall I ()
 
- Static Public Member Functions inherited from Gray::cSingletonStatic< TYPE >
static bool isSingleCreated () noexcept
 
static TYPEget_SingleU () noexcept
 
static TYPEget_Single ()
 
template<class TYPE2 >
static TYPE2 *__stdcall get_SingleCast ()
 
static TYPEI () noexcept
 
- Static Public Member Functions inherited from Gray::cSingletonRegister
static void __stdcall ReleaseModule (HMODULE hMod)
 

Protected Member Functions

 cScriptableInterfaceMgr ()
 
 ~cScriptableInterfaceMgr ()
 
- Protected Member Functions inherited from Gray::cSingleton< cScriptableInterfaceMgr >
 cSingleton (cScriptableInterfaceMgr *pObject, const TYPEINFO_t &rAddrCode=typeid(cScriptableInterfaceMgr)) noexcept
 
virtual ~cSingleton ()
 
- Protected Member Functions inherited from Gray::cSingletonStatic< TYPE >
 cSingletonStatic (TYPE *pObject) noexcept
 
virtual ~cSingletonStatic () noexcept
 
- Protected Member Functions inherited from Gray::cSingletonRegister
 cSingletonRegister (const TYPEINFO_t &rAddrCode) noexcept
 
virtual ~cSingletonRegister ()
 
void RegisterSingleton ()
 
- Protected Member Functions inherited from Gray::cHeapObject
const void * get_HeapPtr () const noexcept override
 Get the top level (outermost, freeable) class pointer. I can delete get_HeapPtr(). More...
 

Friends

class cScriptableInterfaceDef
 
class cSingleton< cScriptableInterfaceMgr >
 

Additional Inherited Members

- Static Public Attributes inherited from Gray::cSingletonRegister
static cThreadLockFast sm_LockSingle
 common lock for all cSingleton. More...
 
- Protected Attributes inherited from Gray::cSingletonRegister
HMODULE m_hModuleLoaded
 What modules loaded this ? So singletons can be destroyed if DLL/SO unloads. More...
 
- Static Protected Attributes inherited from Gray::cSingletonStatic< TYPE >
static TYPEsm_pThe = nullptr
 pointer to the one and only object of this TYPE. ASSUME automatically init to = nullptr. More...
 

Detailed Description

Collect all the cScriptableInterfaceDef defined. make sure all the classes have been properly initialized. because AddInterfaceDef happens at static init time, we must check cAppState::isInCInit()

Constructor & Destructor Documentation

◆ cScriptableInterfaceMgr()

GrayLib::cScriptableInterfaceMgr::cScriptableInterfaceMgr ( )
protected
Note
This must be called BEFORE other static constructors!
Note
This MUST be called BEFORE other static constructors! Thats why it is a cSingleton

◆ ~cScriptableInterfaceMgr()

GrayLib::cScriptableInterfaceMgr::~cScriptableInterfaceMgr ( )
protected

Member Function Documentation

◆ AddInterfaceDef()

SCRIPTINTERFACEID_t GrayLib::cScriptableInterfaceMgr::AddInterfaceDef ( cScriptableInterfaceDef pScriptInterface)

Add a class definition.

Note
This can get called at static definition time. we must come along later and sync these up
Returns
m_nInterfaceID

◆ FindInterfaceDef()

cScriptableInterfaceDefPtr GrayLib::cScriptableInterfaceMgr::FindInterfaceDef ( const ATOMCHAR_t pszName) const

◆ GetInterfaceDef()

cScriptableInterfaceDefPtr GrayLib::cScriptableInterfaceMgr::GetInterfaceDef ( SCRIPTINTERFACEID_t  nInterfaceID) const
inline

◆ InitInterfaceDefs()

void GrayLib::cScriptableInterfaceMgr::InitInterfaceDefs ( )

make sure all the classes are init. do this after static init but before anything else. harmless if already called.

◆ InitInterfaces()

void GRAYCALL GrayLib::cScriptableInterfaceMgr::InitInterfaces ( )
static

make sure all scripting ability is setup. harmless if already called.

◆ isInitInterfaces()

bool GrayLib::cScriptableInterfaceMgr::isInitInterfaces ( ) const
inline

was InitInterfaces() called?

◆ RemoveInterfaceDef()

bool GrayLib::cScriptableInterfaceMgr::RemoveInterfaceDef ( cScriptableInterfaceDef pScriptInterface)

We need to be able to remove late bound (dll) loaded interfaces.

◆ SetMethodPrivLevel()

bool GrayLib::cScriptableInterfaceMgr::SetMethodPrivLevel ( const ATOMCHAR_t pszMethod,
PLEVEL_TYPE  ePrivLevel 
)

Find any methods with this name. g_ScriptInterfaceMgr adjust their PLEVEL_TYPE.

◆ UNITTEST_FRIEND()

GrayLib::cScriptableInterfaceMgr::UNITTEST_FRIEND ( cScriptableInterface  )

◆ UpdateInterfaceProp()

void GrayLib::cScriptableInterfaceMgr::UpdateInterfaceProp ( cScriptableProp pProp)

Late binding for dynamic props. (i.e. Attributes and Stats added ad hoc)

find all classes making use of this and re-sort them. Assume we have just added a new prop. (dynamically)

Friends And Related Function Documentation

◆ cScriptableInterfaceDef

friend class cScriptableInterfaceDef
friend

◆ cSingleton< cScriptableInterfaceMgr >

friend class cSingleton< cScriptableInterfaceMgr >
friend

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