24 #ifndef __OD_GS_FILER_H__
25 #define __OD_GS_FILER_H__
92 kRuntimeChangesSection
102 typedef void (*SetPtrFunc)(
void *pPlace,
const void *pValue);
105 virtual void applySubstitution(
void *pPlace,
const void *pValue, SetPtrFunc pSetFunc) { pSetFunc(pPlace, pValue); }
229 void *
rdPtr()
const {
return (
void*)rdIntPtr(); }
260 OdAnsiString
rdAnsiStringRet()
const { OdAnsiString str; rdAnsiString(str);
return str; }
306 #define OdGsFiler_wrArray(filer, arry, wrFunc) \
308 filer.wrUInt32(arry.size()); \
309 for (OdUInt32 nVal = 0; nVal < arry.size(); nVal++) \
310 filer.wrFunc(arry.getPtr()[nVal]); \
312 #define OdGsFilerPtr_wrArray(pFiler, arry, wrFunc) \
313 OdGsFiler_wrArray((*pFiler), arry, wrFunc)
315 #define OdGsFiler_wrArrayRaw(filer, arry, typSz) \
317 filer.wrUInt32(arry.size()); \
318 if (!arry.isEmpty()) \
319 filer.wrRawData(arry.getPtr(), arry.size() * typSz); \
321 #define OdGsFilerPtr_wrArrayRaw(pFiler, arry, typSz) \
322 OdGsFiler_wrArrayRaw((*pFiler), arry, typSz)
324 #define OdGsFiler_rdArray(filer, arry, rdFunc) \
327 OdUInt32 nElems = filer.rdUInt32(); \
328 arry.setPhysicalLength(nElems); \
329 for (OdUInt32 nElem = 0; nElem < nElems; nElem++) \
330 arry.push_back(filer.rdFunc()); \
332 #define OdGsFilerPtr_rdArray(pFiler, arry, rdFunc) \
333 OdGsFiler_rdArray((*pFiler), arry, rdFunc)
335 #define OdGsFiler_rdArrayArg(filer, arry, rdFunc) \
337 OdUInt32 nElems = filer.rdUInt32(); \
338 arry.resize(nElems); \
339 for (OdUInt32 nElem = 0; nElem < nElems; nElem++) \
340 filer.rdFunc(arry[nElem]); \
342 #define OdGsFilerPtr_rdArrayArg(pFiler, arry, rdFunc) \
343 OdGsFiler_rdArrayArg((*pFiler), arry, rdFunc)
345 #define OdGsFiler_rdArrayRaw(filer, arry, typSz) \
347 OdUInt32 nElems = filer.rdUInt32(); \
348 arry.resize(nElems); \
350 filer.rdRawData(arry.asArrayPtr(), nElems * typSz); \
352 #define OdGsFilerPtr_rdArrayRaw(pFiler, arry, typSz) \
353 OdGsFiler_rdArrayRaw((*pFiler), arry, typSz)
#define GS_TOOLKIT_EXPORT
OdArray< OdGePoint2d, OdMemoryAllocator< OdGePoint2d > > OdGePoint2dArray
OdSmartPtr< OdGsFiler > OdGsFilerPtr
OdRxObject OdDbBaseDatabase
OdSmartPtr< OdGsFilerDbHashPE > OdGsFilerDbHashPEPtr
OdSmartPtr< OdGsFilerCreatorPE > OdGsFilerCreatorPEPtr
OdArray< float, OdMemoryAllocator< float > > OdFloatArray
virtual OdGsFilerPtr createGsFiler(OdStreamBuf *pStream, bool bForWrite, const OdDbBaseDatabase *pDb)=0
ODRX_DECLARE_MEMBERS(OdGsFilerCreatorPE)
virtual OdBinaryData computeDbHash(const OdDbBaseDatabase *pDb)=0
ODRX_DECLARE_MEMBERS(OdGsFilerDbHashPE)
virtual void wrPoint3d(const OdGePoint3d &pt)
virtual void wrFloatArray(const OdFloatArray &arr)
virtual void wrUInt16Array(OdUInt32 count, const OdUInt16 *arr)
virtual void wrClass(OdRxObject *pObj)=0
virtual void wrUInt(unsigned int val)
static OdSmartPtr< OdGsFiler > createObject(OdStreamBuf *pStream, bool bForWrite, const OdDbBaseDatabase *pDb, OdUInt32 nVersion=kVLast)
virtual void wrFloatArray(OdUInt32 count, const float *arr)
virtual unsigned int rdUInt() const
virtual void wrDouble(double val)
virtual void rdVector2d(OdGeVector2d &vec) const
virtual bool hasArbitraryData(const OdChar *pName) const =0
virtual void setDatabase(const OdDbBaseDatabase *pDb)=0
virtual bool setStream(OdStreamBuf *pStream, bool bWrite=false)=0
virtual OdRxObjectPtr rdClass() const =0
virtual void clearRegisteredPtrs()=0
virtual void rdPoint2d(OdGePoint2d &pt) const
virtual OdInt16 rdInt16() const
virtual void wrUInt32Array(const OdUInt32Array &arr)
virtual void wrInt64(OdInt64 val)
virtual void wrEOFSection()=0
virtual bool isPtrRegistered(const void *pPtr) const =0
virtual void wrIntArray(const OdIntArray &arr)
virtual void skipSection() const =0
virtual void makeSubstitutions(bool bClear=true) const =0
virtual void clearArbitraryData()=0
virtual void rdMatrix3d(OdGeMatrix3d &mat) const
virtual void rdGsDCRectDouble(OdGsDCRectDouble &dcrcd)
virtual char rdChar() const
virtual void wrVector2d(const OdGeVector2d &vec)
virtual void wrUInt16Array(const OdUInt16Array &arr)
virtual void wrFloat(float val)
virtual void rdUInt64Array(OdUInt64Vector &vec)
virtual void wrPoint3dArray(const OdGePoint3dArray &arr)
OdAnsiString rdAnsiStringRet() const
virtual void rdUInt16Array(OdUInt16Array &arr)
virtual void wrUInt64Array(const OdUInt64Vector &vec)
virtual void wrSectionEnd(Section section)=0
virtual OdInt32 rdInt32() const
virtual void rdUInt8Array(OdUInt8Array &arr)
virtual void wrIntPtr(OdIntPtr val)
virtual void rdDbStubPtrArray(OdDbStubPtrArray &arr)
virtual void wrUInt16(OdUInt16 val)
virtual void rdVector3d(OdGeVector3d &vec) const
virtual void setSubstitutor(OdRxObject *pSubst)=0
virtual void rdPoint3dArray(OdGePoint3dArray &arr)
virtual void wrString(const OdString &str)
virtual void rdAnsiString(OdAnsiString &str) const
virtual OdUInt8 rdUInt8() const
virtual bool isReadSection(Section section) const =0
virtual void rdExtents3d(OdGeExtents3d &ext) const
virtual void rdUInt16Array(OdUInt32 count, OdUInt16 *arr)
virtual void wrInt16(OdInt16 val)
virtual void wrChar(char val)
virtual Substitutor * subst() const =0
virtual void rdPoint2dArray(OdGePoint2dArray &arr)
virtual bool checkDbHash(const OdDbBaseDatabase *pDb)=0
virtual void rdFloatArray(OdUInt32 count, float *arr)
virtual void wrUInt64Array(const OdUInt64Array &arr)
virtual void wrUInt32Array(const OdUInt32Vector &arr)
virtual void rdUInt64Array(OdUInt32 count, OdUInt64 *arr)
OdString rdStringRet() const
virtual OdUInt64 rdUInt64() const
virtual int rdInt() const
virtual float rdFloat() const
virtual OdRxObjectPtr getArbitraryData(const OdChar *pName) const =0
virtual OdUInt32 version() const =0
virtual void wrHandle(OdDbStub *pHandle)=0
virtual void rdGsDCRect(OdGsDCRect &dcrc)
virtual void rdFloatArray(OdFloatArray &arr)
virtual void wrUInt8(OdUInt8 val)
virtual void wrUInt64(OdUInt64 val)
virtual void wrGsDCRect(const OdGsDCRect &rc)
virtual void wrCOLORREF(ODCOLORREF val)
virtual void wrDbHash(const OdDbBaseDatabase *pDb)=0
virtual void rdIntArray(OdIntArray &arr)
virtual void wrAnsiString(const OdAnsiString &str)
virtual void wrRawData(const void *pData, OdUInt32 nDataSize)=0
virtual bool rdBool() const
ODRX_DECLARE_MEMBERS(OdGsFiler)
virtual void wrDbStubPtrArray(const OdDbStubPtrArray &arr)
virtual Section rdSection() const =0
virtual void wrPoint2dArray(const OdGePoint2dArray &arr)
virtual void rdPoint3d(OdGePoint3d &pt) const
virtual void setVersion(OdUInt32 nVersion)=0
virtual void rdUInt32Array(OdUInt32Vector &arr)
virtual void wrBool(bool bVal)
virtual Section curSection() const =0
virtual void rdString(OdString &str) const
void wrPtr(const void *pPtr)
virtual void setReadSection(Section section, bool bSet)=0
virtual void wrInt(int val)
virtual void setWriteSections(OdUInt64 nSections)=0
virtual void wrMatrix3d(const OdGeMatrix3d &mat)
virtual void wrUInt64Array(OdUInt32 count, const OdUInt64 *arr)
virtual bool checkEOF() const =0
virtual void rdUInt64Array(OdUInt64Array &arr)
virtual void wrUInt8Array(const OdUInt8Array &arr)
virtual void rdRawData(void *pData, OdUInt32 nDataSize) const =0
virtual void unregisterPtr(const void *pPtr)=0
virtual OdRxObjectPtr getSubstitutor() const =0
virtual bool isWriteSection(Section section) const =0
virtual OdDbStub * rdHandle() const =0
virtual ODCOLORREF rdCOLORREF() const
virtual void setReadSections(OdUInt64 nSections)=0
virtual void wrGsDCRectDouble(const OdGsDCRectDouble &rcd)
virtual OdUInt32 rdUInt32() const
virtual OdInt64 rdInt64() const
virtual void rdBackSection() const =0
virtual OdUInt16 rdUInt16() const
virtual void wrPoint2d(const OdGePoint2d &pt)
virtual void registerPtr(const void *pPtr)=0
virtual void setWriteSection(Section section, bool bSet)=0
virtual OdDbBaseDatabase * getDatabase() const =0
virtual void wrInt32(OdInt32 val)
virtual OdIntPtr rdIntPtr() const
virtual void wrSectionBegin(Section section)=0
virtual OdStreamBufPtr getStream() const =0
virtual void wrExtents3d(const OdGeExtents3d &ext)
virtual void rdUInt32Array(OdUInt32Array &arr)
virtual void wrVector3d(const OdGeVector3d &vec)
virtual void setArbitraryData(const OdChar *pName, OdRxObject *pObject)=0
virtual double rdDouble() const
virtual void wrUInt32(OdUInt32 val)
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
AECGEOMETRY_API FacetModeler::Body section(FacetModeler::Body &rBase, const OdGePlane &rCutter)
virtual void applySubstitution(void *pPlace, const void *pValue, SetPtrFunc pSetFunc)
virtual ~SubstitutionActuator()
virtual void registerSubstitution(const void *pValue, const void *pSubstitution, OdUInt32 size=sizeof(OdIntPtr), bool bRegister=true, bool bImmediate=false)=0
virtual void requestSubstitution(void *pPlace, const void *pValue, OdUInt32 size=sizeof(OdIntPtr), bool bRegister=true, bool bImmediate=true)=0
virtual void clearSubstitutions(const void *pValue=NULL, OdUInt32 size=0)=0
virtual void requestSubstitution(void *pPlace, OdGsFiler::SubstitutionActuator *pActuator, const void *pValue, OdUInt32 size=sizeof(OdIntPtr), bool bRegister=true, bool bImmediate=true)=0
virtual void requestSubstitution(OdBaseObjectPtr *pPlace, const void *pValue, bool bRegister=true, bool bImmediate=true)=0
virtual void runSubstitutions(const void *pValue=NULL, OdUInt32 size=0, bool bClear=true)=0