8 #ifndef _INC_cXObjMgr_H
9 #define _INC_cXObjMgr_H
10 #ifndef NO_PRAGMA_ONCE
41 return StrT::CmpI<ATOMCHAR_t>(pData1->get_SymName(), pData2->get_SymName());
47 return StrT::CmpI<ATOMCHAR_t>(key1, pObj->get_SymName());
72 virtual HRESULT CreateXObjDef(
cXObjDefPtr& rpXObjDefNew,
const cXObjTypeDef* pXObjTypeDef, cAtomRef aSymName) = 0;
147 #define cXObjMgrMethod(a,b,c) M_##a,
149 #undef cXObjMgrMethod
177 virtual void DisposeAllX();
196 bool IsXObjTypeDemandLoaded(
XOBJTID_t nXObjTypeId)
const;
204 return m_aXObjSymNames.
GetSize();
209 bool RemoveXObjSymName(
const ATOMCHAR_t* pszSymName);
246 virtual void RemoveXObj(
cXObject* pXObj);
250 virtual void RemoveXObjDef(
cXObjDef* pXObjDef);
253 STDMETHOD(FindByUID)(
UID_t uid, OUT
IXObject** ppObj)
override;
255 STDMETHOD(FindBySymName)(
const ATOMCHAR_t* pszSymName, OUT
IXObject** ppObj)
override;
257 STDMETHOD(CreateInstance)(
IUnknown *pUnkOuter,
const IID& riid, OUT
void **ppvObject)
override;
258 STDMETHOD(LockServer)(BOOL fLock)
override;
260 STDMETHOD(QueryInterface)(
const IID& riid, OUT
void __RPC_FAR* __RPC_FAR* ppvObject)
override;
273 template class GRAYLIB_LINK cHashTableRef<GrayLib::cXObjDef, GrayLib::UID_t, 6>;
#define IGNORE_WARN_INTERFACE(c)
Definition: GrayCore.h:79
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
#define _INC_GrayLibBase_H
Definition: GrayLibBase.h:7
#define HRESULT_WIN32_C(x)
a constant LSTATUS/error_status_t with no check, unlike HRESULT_FROM_WIN32()
Definition: HResult.h:79
#define TYPE
Definition: StrT.cpp:38
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define ASSERT(exp)
Definition: cDebugAssert.h:87
#define CSCRIPT_CLASS_DEF0(TYPE)
Definition: cScriptableInterface.h:271
Definition: cXObjMgr.h:28
virtual COMPARE_t CompareKey(const ATOMCHAR_t *key1, TYPE *pObj) const
Definition: cXObjMgr.h:43
bool RemoveArgKey(TYPE *pBase)
Definition: cXObjMgr.h:53
virtual ~cArraySortSymName()
Definition: cXObjMgr.h:51
virtual COMPARE_t CompareData(TYPE *pData1, TYPE *pData2) const noexcept
Definition: cXObjMgr.h:36
Definition: cScriptableInterface.h:300
Definition: cScriptableInterface.h:97
Definition: cVariant.h:26
Definition: cXObjDef.h:17
Definition: cXObjMgr.h:135
UNITTEST_FRIEND(cXObjMgr)
ITERATE_t get_XObjCount() const
Definition: cXObjMgr.h:202
M_TYPE_
Definition: cXObjMgr.h:146
@ M_QTY
Definition: cXObjMgr.h:150
IUNKNOWN_DISAMBIG_R(cRefBase)
cXObjectPtr GetAtHash(const cHashIterator &e) const
Definition: cXObjMgr.h:180
const cObjectSignature m_Sig
Used to check for compatible config and alignments.
Definition: cXObjMgr.h:158
static HRESULT CheckValidSignature(UINT32 nGrayLibVer, size_t nSizeofThis)
Definition: cXObjMgr.h:223
cHashTableRef< cXObject, UID_t, 6 > m_XObjHash
the hash of cXObject objects by UID. Some may be in private hash! cUIDManagerArray?...
Definition: cXObjMgr.h:162
cThreadLockCount m_LockXObj
used to lock access m_XObjHash
Definition: cXObjMgr.h:167
cArrayPtr< cXObjTypeDef > m_aXObjTypeDefs
Metadata info about the cXObject types i use. XOBJTID_t, XOBJTIDX_TYPE = index in this array.
Definition: cXObjMgr.h:170
cArraySortSymName< cXObjDef > m_aXObjSymNames
Store all cXObjDef(s) sorted by SymName or get_SymName()
Definition: cXObjMgr.h:166
static cXObjTypeDef sm_DEFAULT
Used to create a bare XObject.
Definition: cXObjMgr.h:153
Definition: cXObjMgr.h:92
bool IsXObjFlags(BYTE nFlags) const noexcept
Definition: cXObjMgr.h:115
XOBJTID_t m_nXObjTypeId
The global FOURCC for the type. MAKEFOURCC()
Definition: cXObjMgr.h:102
XOBJTIDX_TYPE m_eXObjTypeIdx
Enum in m_aXObjTypeDefs. used for UID type bits. assume static but filled in by RegisterXObjTypeDef a...
Definition: cXObjMgr.h:109
IXObjModPlugin * m_pXObjModPlugin
How to create/store/find one of these? cXObjModule parentage of the type.
Definition: cXObjMgr.h:107
const char * m_pszDescription
Friendly description text for type.
Definition: cXObjMgr.h:106
XOBJTID_t get_HashCode() const noexcept
Definition: cXObjMgr.h:125
const ATOMCHAR_t * m_pszTableName
Name of the table. (ATOM)
Definition: cXObjMgr.h:103
BYTE m_nXObjFlags
Mask of XOBJTYPF_TYPE XOBJTYPF_DEMANDLOAD.
Definition: cXObjMgr.h:104
static const char * k_pszNULL
k_XOBJTID_NULL name
Definition: cXObjMgr.h:112
cUIDRangeMask m_UIDRange
How to make a UID for this. (may need m_eXObjTypeIdx to set this).
Definition: cXObjMgr.h:110
cScriptableInterfaceDef * m_pInterfaceDef
What top interface is this type equated to? (might have same name)
Definition: cXObjMgr.h:108
const char * m_pszTableSelect
The whole table typically read in at once at start. SQL select statement.
Definition: cXObjMgr.h:105
bool isXObjTypeDemandLoaded() const noexcept
Definition: cXObjMgr.h:120
Definition: cXObject.h:78
ITERATE_t GetSize() const noexcept
Definition: cArray.h:137
Definition: cArraySortRef.h:19
Definition: cArraySort.h:24
bool RemoveArgKey(REF_t pObj, KEY_t key)
Definition: cArraySort.h:44
Definition: cHashTable.h:20
Definition: cHashTable.h:191
PTR_t GetAtHash(const cHashIterator &i) const
Definition: cHashTable.h:213
bool IsValidSignature(UINT32 nVer, size_t nSizeofThis) const
Definition: cObject.h:40
Definition: cSingletonPtr.h:20
Definition: cSingleton.h:127
Definition: cThreadLock.h:498
Definition: IScriptableObj.h:38
Definition: IXObject.h:69
Definition: cXObjMgr.h:62
Definition: IXObject.h:46
Definition: IUnknown.h:68
FOURCC XOBJTID_t
a unique FOURCC id for a type of XObject, 0=k_XOBJTID_NULL, MAKEFOURCC(a,b,c,d). Equiv to GUID for IU...
Definition: IXObject.h:42
cRefPtr< cXObject > cXObjectPtr
Definition: cXObject.h:331
int UIDINDEX_t
non dressed (partial) UID_t. just an index in a range inside the UID_t. k_HASHCODE_CLEAR
Definition: cUID.h:69
int XOBJTIDX_TYPE
enumerated cXObjTypeDef
Definition: cXObject.h:42
cRefPtr< cXObjDef > cXObjDefPtr
Definition: cXObjDef.h:152
XOBJTYPF_TYPE
Definition: cXObjMgr.h:77
@ XOBJTYPF_PRIVNAME
Private name space. not using SYMNAME space. (e.g. Accounts)
Definition: cXObjMgr.h:83
@ XOBJTYPF_NOUID
Object does not have a UID. Not based on cXObject.
Definition: cXObjMgr.h:87
@ XOBJTYPF_SINGLETON
Just one object. (e.g. server params)
Definition: cXObjMgr.h:81
@ XOBJTYPF_SIMPLE
Simple type. No cScriptableInterfaceDef (ex. Constants NAME=Val)
Definition: cXObjMgr.h:84
@ XOBJTYPF_STATIC
Only read in at startup and has hard coded components.
Definition: cXObjMgr.h:86
@ XOBJTYPF_NOPERSIST
Maybe a temporary object. not stored in DB.
Definition: cXObjMgr.h:88
@ XOBJTYPF_0
Definition: cXObjMgr.h:80
@ XOBJTYPF_DEMANDLOAD
Not Loaded at start time, may be only partial loaded/enumerated. use stub placeholder.
Definition: cXObjMgr.h:82
@ XOBJTYPF_DEPRECATED
phased out resource type
Definition: cXObjMgr.h:85
MIDL_INTERFACE("0C3E2E71-B93C-11d2-AAD0-006007654304") IScriptableObj
HASHCODE32_t UID_t
Sort of the same as a HASHCODE_t. not the same as UIDINDEX_t.
Definition: cUID.h:18
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
int COMPARE_t
result of compare. 0=same, 1=a>b, -1=a<b
Definition: cValT.h:17
const HASHCODE_t k_HASHCODE_CLEAR
not a valid index.
Definition: GrayCore.h:118
int ITERATE_t
like size_t but signed
Definition: Index.h:28
char ATOMCHAR_t
the char form (UNICODE or not) for an atom. (for symbolic names)
Definition: StrConst.h:15
uint16 index
Definition: sample3.cpp:29
static bool IsValidApp(const void *pData) noexcept
Definition: cMem.h:42
Definition: IUnknown.h:34