6 #ifndef _INC_cXObject_H
7 #define _INC_cXObject_H
12 #include "../Scriptable/cScriptableObj.h"
13 #include "../Variant/cVarMap.h"
23 #pragma warning(disable:4250)
36 #define XOBJ_ROOT "Root"
51 return ((((
int)(_Interface)) << 12) | (((
int)(_CantFix) << 8)) | ((
int)(_UniqueTestCode)));
104 #define cXObjectProp(a,b,c,d) P_##a,
114 #define cXObjectMethod(a,b,c,d) M_##a,
116 #undef cXObjectMethod
138 virtual bool isValidCheck() const noexcept override;
182 void put_UIDValuePrivate(
UID_t dwIndex);
191 if (!sName.Compare(get_Name()))
203 STDMETHOD(put_SymName)(
cAtomRef aSymName,
bool bOverwrite =
false);
226 virtual cVariant get_ContainerVar()
const;
234 bool isMyContainer(
const cXObject* pObjParent)
const;
264 bool isObjStateDisposed() const noexcept;
265 bool isObjStateBad() const noexcept;
267 STDMETHOD(SetObjStateLoaded)();
268 void SetObjStateBad();
269 void SetObjStateModified();
270 void ClearObjStateModified();
280 m_timeSaved = timeSaved;
282 void UpdateTimeSaved();
296 STDMETHOD(s_GetByName)(
const ATOMCHAR_t* pszPropName, OUT
cVariant& rvValRet)
override;
303 STDMETHOD(s_EventSinkAdd)(
cXObjDef* pXObjDef,
bool bRemove =
false)
322 virtual size_t GetHeapStats(OUT
ITERATE_t& iAllocCount)
const;
328 STDMETHOD(QueryInterface)(
const IID& riid,
void** ppvObject)
override;
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
#define HRESULT_WIN32_C(x)
a constant LSTATUS/error_status_t with no check, unlike HRESULT_FROM_WIN32()
Definition: HResult.h:79
#define UNREFERENCED_PARAMETER(P)
< _WIN32 type thing. get rid of stupid warning.
Definition: SysTypes.h:299
#define UNREFERENCED_REFERENCE(x)
Definition: SysTypes.h:318
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define CSCRIPT_CLASS_DEF0(TYPE)
Definition: cScriptableInterface.h:271
Definition: cScriptContext.h:24
Definition: cScriptableObj.h:26
Definition: cScriptableInterface.h:97
static const UID_t k_CLEAR
Hard coded UID_t values.
Definition: cUID.h:32
Definition: cVarMap.h:109
Definition: cVariant.h:26
Definition: cXObjDef.h:17
Definition: cXObject.h:78
bool isObjStateLoaded() const noexcept
Definition: cXObject.h:255
CHEAPOBJECT_IMPL
Definition: cXObject.h:127
cVarMap m_TagMap
attach extra tags here. (e.g. properties that don't apply to all instances. ASSUME NO OVERLAP with de...
Definition: cXObject.h:122
cXObjDef * get_BaseDef() const
Definition: cXObject.h:207
STDMETHOD_(void, put_UIDValue)(UID_t dwIndex)
UID_t get_UIDValue() const noexcept
Definition: cXObject.h:167
virtual bool put_BaseDef(cXObjDef *pDef)
Definition: cXObject.h:212
IUNKNOWN_DISAMBIG_R(cThreadLockableRef)
STDMETHOD_(cString, get_Name)() const override
UID_t get_HashCode() const noexcept
Definition: cXObject.h:171
XObjState_TYPE get_ObjState() const noexcept
Definition: cXObject.h:239
STDMETHOD_(cString, get_NameDeco)() const
Definition: cXObject.h:195
STDMETHOD_(cStringA, get_SymName)() const override
bool isValidUID() const noexcept
Definition: cXObject.h:159
bool isObjStateLoading() const noexcept
Definition: cXObject.h:245
static ITERATE_t sm_iLoadingCount
are we loading ? LoadXObject() reentrant ?
Definition: cXObject.h:124
STDMETHOD_(cAtomRef, get_BaseSymNameA)() const
shortcut for symbolic name for get_BaseDef()
void put_TimeSaved(cTimeInt timeSaved)
Definition: cXObject.h:277
bool isObjStateLoading1() const noexcept
Definition: cXObject.h:250
cRefPtr< cXObjDef > m_pBaseDef
This XObject is based on a template of other XObject/XObjDef. overloads it's props via m_TagMap.
Definition: cXObject.h:128
M_TYPE_
base methods that all objects have.
Definition: cXObject.h:113
@ M_QTY
Definition: cXObject.h:117
virtual int get_BaseRefCount() const
Definition: cXObject.h:149
bool isObjStateModified() const noexcept
Definition: cXObject.h:260
virtual cRefPtr< cXObject > get_ContainerObject() const
Definition: cXObject.h:221
STDMETHOD_(HASHCODE_t, get_HashCodeX)() const noexcept override
Definition: cXObject.h:176
P_TYPE_
Definition: cXObject.h:103
@ P_QTY
Definition: cXObject.h:107
Definition: cHeapObject.h:38
Definition: cStream.h:126
Definition: cThreadLockRef.h:20
< similar to the MFC CTime and cTimeSpan, not as accurate or large ranged as COleDateTime
Definition: cTimeInt.h:101
Definition: IScriptableObj.h:38
Definition: IScriptableObj.h:62
Definition: IXObject.h:46
cScriptableProp cScriptableMethod
Methods are really similar to Props.
Definition: cScriptableInterface.h:253
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
const int k_XOBJTIDX_QTY
max cXObjTypeDef. NOT USED.
Definition: cXObject.h:44
cRefPtr< cXObject > cXObjectPtr
Definition: cXObject.h:331
UNITTEST2_PREDEF(cQuadtree)
XObjState_TYPE
Definition: cXObject.h:55
@ XObjState_Disposed
2=in the process of being deleted. DisposeThis has been completed.
Definition: cXObject.h:62
@ XObjState_Loaded1
6=Temporary state for checking the first load.
Definition: cXObject.h:67
@ XObjState_Modified
7=has been changed from its loaded state. Needs to be persisted/flushed out to database/file.
Definition: cXObject.h:68
@ XObjState_Loading
1=Loading params. created from program, script, import table or database, etc
Definition: cXObject.h:60
@ XObjState_Init
0=just initialize. No values loaded yet.
Definition: cXObject.h:59
@ XObjState_QTY
Definition: cXObject.h:69
@ XObjState_Disposing
3=in the process of cleaning up. DisposeThis has been called.
Definition: cXObject.h:63
@ XObjState_Bad
4=Def or file that could not be loaded. call DisposeThis later some time. Its in a not valid state.
Definition: cXObject.h:64
@ XObjState_Loaded
5=loaded OK.
Definition: cXObject.h:66
class __DECL_IMPORT cXObject
Definition: cXObject.h:33
XOBJ_WEIRD_t XOBJ_WEIRD_CODE(int _Interface, int _CantFix, int _UniqueTestCode)
Definition: cXObject.h:47
int XOBJ_WEIRD_t
Definition: cXObject.h:46
int XOBJTIDX_TYPE
enumerated cXObjTypeDef
Definition: cXObject.h:42
UINT XOBJ_DUMP_MASK_t
enum XOBJ_DUMP_MASK_
Definition: cScriptableInterface.h:51
const XOBJTID_t k_XOBJTID_DEFAULT
a default XObject created for scripting.
Definition: IXObject.h:44
HASHCODE32_t UID_t
Sort of the same as a HASHCODE_t. not the same as UIDINDEX_t.
Definition: cUID.h:18
int ITERATE_t
like size_t but signed
Definition: Index.h:28
UINT_PTR HASHCODE_t
could hold a pointer converted to a number? maybe 64 or 32 bit ? same as size_t.
Definition: GrayCore.h:116
char ATOMCHAR_t
the char form (UNICODE or not) for an atom. (for symbolic names)
Definition: StrConst.h:15
static bool IsValidApp(const void *pData) noexcept
Definition: cMem.h:42
Definition: IUnknown.h:34