6 #ifndef _INC_cArchive_H
7 #define _INC_cArchive_H
29 const bool m_bStoring;
44 : m_bStoring(bStoring)
74 HRESULT Serialize(
void* pData,
size_t nSize);
75 HRESULT SerializeSize(
size_t& nSize);
81 return Serialize(
const_cast<void*
>(pData), nSize);
87 return Serialize(pData, nSize);
105 #define CTYPE_DEF(a,_TYPE,c,d,e,f,g,h) HRESULT Serialize( _TYPE& Val ) { return Serialize(&Val,sizeof(Val)); } \
106 cArchive& operator << (const _TYPE& Val) { Write(&Val,sizeof(Val)); return *this; } \
107 cArchive& operator >> (_TYPE& Val) { Read(&Val,sizeof(Val)); return *this; }
119 #define DECLARE_SERIAL(class_name) friend CArchive& GRAYCALL operator>>(CArchive& ar, class_name* &pOb);
120 #define IMPLEMENT_SERIAL(class_name,base_name,quant)
#define GRAYCORE_LINK
Definition: GrayCore.h:47
MIT License free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to and or sell copies of the and to permit persons to whom the Software is furnished to do so
Definition: LICENSE.txt:10
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Gray::cArchive CArchive
Definition: cArchive.h:117
#define ASSERT(exp)
Definition: cDebugAssert.h:87
#define UNITTEST2_PREDEF(x)
Definition: cUnitTestDecl.h:19
#define UNITTEST_FRIEND(n)
Define this in the class body to be unit tested. Allow the unit test to access private/protected stuf...
Definition: cUnitTestDecl.h:17
Definition: cArchive.h:20
bool IsLoading() const noexcept
Definition: cArchive.h:55
cStreamOutput & ref_Out()
Definition: cArchive.h:62
bool IsStoring() const noexcept
Definition: cArchive.h:49
void WriteCount(size_t n)
Definition: cArchive.h:98
cArchive(cStream &s, bool bStoring) noexcept
Definition: cArchive.h:43
HRESULT Write(const void *pData, size_t nSize)
Definition: cArchive.h:77
COUNT_t ReadCount()
Definition: cArchive.h:90
cStreamInput & ref_Inp()
Definition: cArchive.h:67
cArchive(cStreamInput &si) noexcept
Definition: cArchive.h:38
HRESULT Read(void *pData, size_t nSize)
Definition: cArchive.h:83
cArchive(cStreamOutput &so) noexcept
Definition: cArchive.h:33
Definition: cStream.h:126
Definition: cStream.h:456
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
size_t COUNT_t
like size_t but a count of things that might NOT be bytes. ASSUME unsigned. _countof(x)
Definition: Index.h:32
class __DECL_IMPORT cArchive
Definition: cString.h:28