CFx SDK Documentation  2020SP3
GsFilerV100Impl.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef __OdGsFilerV100Impl_H__
25 #define __OdGsFilerV100Impl_H__
26 
27 #include "TD_PackPush.h"
28 #include "Ge/GeMatrix3d.h"
29 #include "Ge/GeExtents3d.h"
30 #include "DbBaseDatabase.h"
31 #include "GsFiler.h"
32 #include "OdStack.h"
33 #include "RxObjectImpl.h"
34 
35 
36 // Database linker
38 {
39 public:
41  virtual ~OdGsFilerDbLinker() { }
42 public:
43  // Get database hash
44  virtual OdBinaryData getDbHash(const OdDbBaseDatabase *pDb) const;
45 
46  // Transform database handle
47  virtual OdUInt64 stubToDbHandle(OdDbStub *pStub) const = 0;
48  virtual OdDbStub *handleToDbStub(OdUInt64 nHandle) const = 0;
49 
50  // Util methods
51  virtual OdDbBaseDatabase *getDatabase() const = 0;
52  virtual OdDbBaseDatabase *getDatabase(OdDbStub *pStub) const = 0;
53 };
54 
56 
57 
58 
59 #define STL_USING_MAP
60 #define STL_USING_SET
61 #include "OdaSTL.h"
62 
63 // Implement substitutor
65 {
66  template<OdUInt32 nBytes> struct DataTyp
67  {
68  OdUInt8 m_data[nBytes];
69  static int compare(const DataTyp &t1, const DataTyp &t2)
70  {
71  for (OdUInt32 nb = 0; nb < nBytes; nb++)
72  {
73  if (t1.m_data[nb] != t2.m_data[nb])
74  return int(t1.m_data[nb]) - int(t2.m_data[nb]);
75  }
76  return 0;
77  }
78  bool operator ==(const DataTyp &t2) const { return compare(*this, t2) == 0; }
79  bool operator !=(const DataTyp &t2) const { return compare(*this, t2) != 0; }
80  bool operator <(const DataTyp &t2) const { return compare(*this, t2) < 0; }
81  bool operator <=(const DataTyp &t2) const { return compare(*this, t2) <= 0; }
82  bool operator >(const DataTyp &t2) const { return compare(*this, t2) > 0; }
83  bool operator >=(const DataTyp &t2) const { return compare(*this, t2) >= 0; }
84 
85  operator const void*() const { return this; }
86  };
87  struct VoidsSet
88  {
89  void *m_pVoid;
91  };
92  struct VoidArry : public VoidsSet
93  {
96  : m_nVoids(0)
97  {
98  m_pVoid = NULL;
99  m_pAct = NULL;
100  }
101  ~VoidArry() { clear(); }
102  VoidsSet *getSet() { return (VoidsSet*)m_pVoid; }
104  if (m_nVoids == 1)
105  return this;
106  return getSet() + n;
107  }
108  bool contains(void *pVoid);
109  void add(void *pVoid, OdGsFiler::SubstitutionActuator *pAct);
110  void kill(void *pVoid);
111  void clear();
112  };
113 
114  struct AbstractTyp
115  {
117  AbstractTyp() : m_pContainer(NULL) { }
118  };
119  typedef std::map<OdUInt32, AbstractTyp> RegsMap;
120  typedef std::map<OdUInt32, AbstractTyp> SubstsMap;
123 
124  template<OdUInt32 nBytes> struct Procs
125  {
127  typedef std::map<ProcTyp, ProcTyp> RegMap;
128  typedef std::map<ProcTyp, VoidArry> SubstMap;
129  static void makeSubst(void *pPlace, const void *pSubstitution)
130  {
131  *(ProcTyp*)(pPlace) = *(const ProcTyp*)(pSubstitution);
132  }
133  static void runSubst(void *pPlace, const void *pSubstitution, OdGsFiler::SubstitutionActuator *pActuator)
134  {
135  ODA_ASSERT(pActuator);
136  pActuator->applySubstitution(pPlace, pSubstitution, makeSubst);
137  }
138  static void subst(OdGsFiler_SubstitutorImpl &impl, const void *pValue, void *pPlace, OdGsFiler::SubstitutionActuator *pAct, const void *pSubstitution, bool bClear)
139  {
140  if (pPlace && pSubstitution)
141  {
142  runSubst(pPlace, pSubstitution, pAct);
143  return;
144  }
145  if (pValue)
146  {
147  if (pPlace)
148  {
149  RegMap *pRegMap = (RegMap*)impl.m_regs[nBytes].m_pContainer;
150  OD_TYPENAME RegMap::iterator itReg = pRegMap->find(*(const ProcTyp*)pValue);
151  if (itReg != pRegMap->end())
152  {
153  runSubst(pPlace, itReg->second, pAct);
154  if (bClear)
155  pRegMap->erase(itReg);
156  }
157  }
158  else if (pSubstitution)
159  {
160  SubstMap *pSubMap = (SubstMap*)impl.m_substs[nBytes].m_pContainer;
161  OD_TYPENAME SubstMap::iterator itSub = pSubMap->find(*(const ProcTyp*)pValue);
162  if (itSub != pSubMap->end())
163  {
164  for (OdInt32 n = 0; n < itSub->second.m_nVoids; n++)
165  runSubst(itSub->second.at(n)->m_pVoid, pSubstitution, itSub->second.at(n)->m_pAct);
166  if (bClear)
167  pSubMap->erase(itSub);
168  }
169  }
170  else
171  {
172  RegMap *pRegMap = (RegMap*)impl.m_regs[nBytes].m_pContainer;
173  SubstMap *pSubMap = (SubstMap*)impl.m_substs[nBytes].m_pContainer;
174  if (pRegMap && pSubMap)
175  {
176  OD_TYPENAME RegMap::iterator itReg = pRegMap->find(*(const ProcTyp*)pValue);
177  OD_TYPENAME SubstMap::iterator itSub = pSubMap->find(*(const ProcTyp*)pValue);
178  if ((itReg != pRegMap->end()) && (itSub != pSubMap->end()))
179  {
180  for (OdInt32 n = 0; n < itSub->second.m_nVoids; n++)
181  runSubst(itSub->second.at(n)->m_pVoid, itReg->second, itSub->second.at(n)->m_pAct);
182  }
183  if (bClear)
184  {
185  if (itReg != pRegMap->end())
186  pRegMap->erase(itReg);
187  if (itSub != pSubMap->end())
188  pSubMap->erase(itSub);
189  }
190  }
191  else if (bClear)
192  {
193  if (pRegMap)
194  {
195  OD_TYPENAME RegMap::iterator itReg = pRegMap->find(*(const ProcTyp*)pValue);
196  if (itReg != pRegMap->end())
197  pRegMap->erase(itReg);
198  }
199  if (pSubMap)
200  {
201  OD_TYPENAME SubstMap::iterator itSub = pSubMap->find(*(const ProcTyp*)pValue);
202  if (itSub != pSubMap->end())
203  pSubMap->erase(itSub);
204  }
205  }
206  }
207  return;
208  }
209  RegMap *pRegMap = (RegMap*)impl.m_regs[nBytes].m_pContainer;
210  SubstMap *pSubMap = (SubstMap*)impl.m_substs[nBytes].m_pContainer;
211  if (pRegMap && pSubMap)
212  {
213  OD_TYPENAME RegMap::iterator itReg = pRegMap->begin();
214  while (itReg != pRegMap->end())
215  {
216  OD_TYPENAME SubstMap::iterator itSub = pSubMap->find(itReg->first);
217  if (itSub != pSubMap->end())
218  {
219  for (OdInt32 n = 0; n < itSub->second.m_nVoids; n++)
220  runSubst(itSub->second.at(n)->m_pVoid, itReg->second, itSub->second.at(n)->m_pAct);
221  }
222  itReg++;
223  }
224  }
225  if (bClear)
226  {
227  if (pRegMap) { delete pRegMap; impl.m_regs[nBytes].m_pContainer = NULL; }
228  if (pSubMap) { delete pSubMap; impl.m_substs[nBytes].m_pContainer = NULL; }
229  }
230  }
231  static void reg(OdGsFiler_SubstitutorImpl &impl, const void *pValue, const void *pSubstitution, bool bRegister, bool bImmediate)
232  {
233  if (bRegister)
234  {
235  OdGsFiler_SubstitutorImpl::AbstractTyp &cont = impl.m_regs[nBytes];
236  if (!cont.m_pContainer)
237  cont.m_pContainer = new RegMap;
238  RegMap &pMap = *(RegMap*)cont.m_pContainer;
239  pMap[*(const ProcTyp*)pValue] = *(const ProcTyp*)pSubstitution;
240  }
241  if (bImmediate)
242  subst(impl, pValue, NULL, NULL, pSubstitution, false);
243  }
244  static void req(OdGsFiler_SubstitutorImpl &impl, void *pPlace, OdGsFiler::SubstitutionActuator *pAct, const void *pValue, bool bRegister, bool bImmediate)
245  {
246  if (bRegister)
247  {
248  if (bImmediate)
249  {
250  RegMap *pRegMap = (RegMap*)impl.m_regs[nBytes].m_pContainer;
251  if (pRegMap)
252  {
253  OD_TYPENAME RegMap::iterator itReg = pRegMap->find(*(const ProcTyp*)pValue);
254  if (itReg != pRegMap->end())
255  {
256  runSubst(pPlace, itReg->second, pAct);
257  return;
258  }
259  }
260  }
262  if (!cont.m_pContainer)
263  cont.m_pContainer = new SubstMap;
264  SubstMap &pMap = *(SubstMap*)cont.m_pContainer;
265  pMap[*(const ProcTyp*)pValue].add(pPlace, pAct);
266  }
267  else if (bImmediate)
268  subst(impl, pValue, pPlace, pAct, NULL, false);
269  }
270  static void clear(OdGsFiler_SubstitutorImpl &impl, const void *pValue)
271  {
272  RegMap *pRegMap = (RegMap*)impl.m_regs[nBytes].m_pContainer;
273  SubstMap *pSubMap = (SubstMap*)impl.m_substs[nBytes].m_pContainer;
274  if (pValue)
275  {
276  if (pRegMap)
277  {
278  OD_TYPENAME RegMap::iterator it = pRegMap->find(*(const ProcTyp*)pValue);
279  if (it != pRegMap->end())
280  pRegMap->erase(it);
281  }
282  if (pSubMap)
283  {
284  OD_TYPENAME SubstMap::iterator it = pSubMap->find(*(const ProcTyp*)pValue);
285  if (it != pSubMap->end())
286  pSubMap->erase(it);
287  }
288  }
289  else
290  {
291  if (pRegMap) { delete pRegMap; impl.m_regs[nBytes].m_pContainer = NULL; }
292  if (pSubMap) { delete pSubMap; impl.m_substs[nBytes].m_pContainer = NULL; }
293  }
294  }
295  };
296 
298  static struct OdRxObjectSubstitutionActuator : public OdGsFiler::SubstitutionActuator
299  {
300  OdRxObjectSubstitutionActuator() { }
301  virtual void applySubstitution(void *pPlace, const void *pValue, SetPtrFunc pSetFunc)
302  {
303  OdGsFiler::SubstitutionActuator::applySubstitution(pPlace, pValue, pSetFunc);
304  if (pPlace)
305  (*reinterpret_cast<OdRxObjectPtr*>(pPlace))->addRef();
306  }
307  } g_rxObjectActuator;
308 
309  // Register known substitution
310  virtual void registerSubstitution(const void *pValue, const void *pSubstitution, OdUInt32 size = sizeof(OdIntPtr), bool bRegister = true, bool bImmediate = false);
311  // Register substitution request
312  virtual void requestSubstitution(void *pPlace, const void *pValue, OdUInt32 size = sizeof(OdIntPtr), bool bRegister = true, bool bImmediate = true);
313  // Register substitution request for smart pointer
314  virtual void requestSubstitution(OdBaseObjectPtr *pPlace, const void *pValue, bool bRegister = true, bool bImmediate = true);
315  // Register substitution with non-default behavior
316  virtual void requestSubstitution(void *pPlace, OdGsFiler::SubstitutionActuator *pActuator, const void *pValue, OdUInt32 size = sizeof(OdIntPtr), bool bRegister = true, bool bImmediate = true);
317  // Clear substitutions
318  virtual void clearSubstitutions(const void *pValue = NULL, OdUInt32 size = 0);
319  // Run substitutions
320  virtual void runSubstitutions(const void *pValue = NULL, OdUInt32 size = 0, bool bClear = true);
321 #undef REG_FUNCCALL
323 };
324 
325 
326 // Implement V1 version filer
328 protected:
329  enum Flags {
330  kOpenedForWrite = (1 << 0),
331 
332  kLastFlag = kOpenedForWrite
333  };
334 protected:
343  struct WrSectionData {
347  : m_type(OdGsFiler::kEOFSection)
348  , m_begin(0)
349  { }
351  : m_type(section)
352  , m_begin(tell)
353  { }
354  };
357  typedef std::map<OdString, OdRxObjectPtr> ArbDataMap;
359  typedef std::set<const void *> RegPtrsSet;
361 protected:
362  bool isWriting() const { return GETBIT(m_nFlags, kOpenedForWrite); }
363  void setWriting(bool bSet) { SETBIT(m_nFlags, kOpenedForWrite, bSet); }
364 
365  void assertWr() const { if (!isWriting()) throw OdError(eNotOpenForWrite); }
366  void assertRd() const { if (isWriting()) throw OdError(eNotOpenForRead); }
367 public:
369  : m_nSectionsToWrite(OdUInt64(-1))
370  , m_nSectionsToRead(OdUInt64(-1))
371  , m_nFlags(0)
372  , m_nVersion(kV2)
373  , m_nCurSection(kEOFSection)
374  , m_nCurSectionSize(0)
375  {
377  }
379  {
380  }
381 
385 
386  virtual bool setStream(OdStreamBuf *pStream, bool bWrite = false);
387  virtual OdStreamBufPtr getStream() const;
388 
389  virtual void setDatabase(const OdDbBaseDatabase *pDb);
390  virtual OdDbBaseDatabase *getDatabase() const;
391 
392  virtual void setVersion(OdUInt32 nVersion);
393  virtual OdUInt32 version() const;
394 
395  virtual void wrDbHash(const OdDbBaseDatabase *pDb);
396  virtual bool checkDbHash(const OdDbBaseDatabase *pDb);
397 
398  virtual void setWriteSections(OdUInt64 nSections);
399  virtual void setWriteSection(Section section, bool bSet);
400  virtual bool isWriteSection(Section section) const;
401 
402  virtual void setReadSections(OdUInt64 nSections);
403  virtual void setReadSection(Section section, bool bSet);
404  virtual bool isReadSection(Section section) const;
405 
406  virtual void wrSectionBegin(Section section);
407  virtual void wrSectionEnd(Section section);
408  virtual void wrEOFSection();
409 
410  virtual Section rdSection() const;
411  virtual Section curSection() const;
412  virtual void skipSection() const;
413  virtual void rdBackSection() const;
414  virtual bool checkEOF() const;
415 
416  virtual Substitutor *subst() const;
417  virtual void makeSubstitutions(bool bClear = true) const;
418  virtual OdRxObjectPtr getSubstitutor() const;
419  virtual void setSubstitutor(OdRxObject *pSubst);
420 
421  virtual void setArbitraryData(const OdChar *pName, OdRxObject *pObject);
422  virtual OdRxObjectPtr getArbitraryData(const OdChar *pName) const;
423  virtual bool hasArbitraryData(const OdChar *pName) const;
424  virtual void clearArbitraryData();
425 
426  virtual void registerPtr(const void *pPtr);
427  virtual void unregisterPtr(const void *pPtr);
428  virtual bool isPtrRegistered(const void *pPtr) const;
429  virtual void clearRegisteredPtrs();
430 
431  virtual void wrHandle(OdDbStub *pHandle);
432  virtual OdDbStub *rdHandle() const;
433 
434  virtual void wrClass(OdRxObject *pObj);
435  virtual OdRxObjectPtr rdClass() const;
436 
437  virtual void wrRawData(const void *pData, OdUInt32 nDataSize);
438  virtual void rdRawData(void *pData, OdUInt32 nDataSize) const;
439 };
440 
441 #include "TD_PackPop.h"
442 
443 #endif // __OdGsFilerV100Impl_H__
GETBIT
#define GETBIT(flags, bit)
Definition: OdaDefs.h:498
operator<=
bool operator<=(const OdString &s1, const OdString &s2)
Definition: OdString.h:1329
OdGsFilerV100Impl::skipSection
virtual void skipSection() const
OdGsFilerV100Impl::wrSectionEnd
virtual void wrSectionEnd(Section section)
OdGsFiler_SubstitutorImpl::AbstractTyp::AbstractTyp
AbstractTyp()
Definition: GsFilerV100Impl.h:117
OdGsFiler_SubstitutorImpl::runSubstitutions
virtual void runSubstitutions(const void *pValue=NULL, OdUInt32 size=0, bool bClear=true)
OdGsFilerV100Impl::rdSection
virtual Section rdSection() const
OdGsFilerV100Impl::getArbitraryData
virtual OdRxObjectPtr getArbitraryData(const OdChar *pName) const
OdGsFiler_SubstitutorImpl::VoidsSet::m_pAct
OdGsFiler::SubstitutionActuator * m_pAct
Definition: GsFilerV100Impl.h:90
NULL
#define NULL
Definition: GsProperties.h:177
OdGsFiler_SubstitutorImpl::Procs::clear
static void clear(OdGsFiler_SubstitutorImpl &impl, const void *pValue)
Definition: GsFilerV100Impl.h:270
OdGsFilerV100Impl::isPtrRegistered
virtual bool isPtrRegistered(const void *pPtr) const
OdGsFiler_SubstitutorImpl::VoidArry::getSet
VoidsSet * getSet()
Definition: GsFilerV100Impl.h:102
OdRxObjectPtr
Definition: RxObject.h:345
OdGsFilerV100Impl::setWriting
void setWriting(bool bSet)
Definition: GsFilerV100Impl.h:363
OdGsFilerV100Impl::wrSectionBegin
virtual void wrSectionBegin(Section section)
OdGsFilerV100Impl::rdBackSection
virtual void rdBackSection() const
OdUInt8
unsigned char OdUInt8
Definition: OdPlatformSettings.h:759
OdGsFilerV100Impl::subst
virtual Substitutor * subst() const
OdGsFilerV100Impl::wrDbHash
virtual void wrDbHash(const OdDbBaseDatabase *pDb)
OdGsFiler::SubstitutionActuator
Definition: GsFiler.h:101
OdGsFilerV100Impl::version
virtual OdUInt32 version() const
OdGsFilerV100Impl::m_nCurSectionSize
OdUInt32 m_nCurSectionSize
Definition: GsFilerV100Impl.h:342
OdGsFilerDbLinkerPtr
OdSmartPtr< OdGsFilerDbLinker > OdGsFilerDbLinkerPtr
Definition: GsFilerV100Impl.h:55
OdGsFiler_SubstitutorImpl::RegsMap
std::map< OdUInt32, AbstractTyp > RegsMap
Definition: GsFilerV100Impl.h:119
OdGsFilerV100Impl::unregisterPtr
virtual void unregisterPtr(const void *pPtr)
OdGsFiler_SubstitutorImpl
Definition: GsFilerV100Impl.h:65
OdGsFiler::SubstitutionActuator::applySubstitution
virtual void applySubstitution(void *pPlace, const void *pValue, SetPtrFunc pSetFunc)
Definition: GsFiler.h:105
OdGsFiler_SubstitutorImpl::DataTyp::compare
static int compare(const DataTyp &t1, const DataTyp &t2)
Definition: GsFilerV100Impl.h:69
OdGsFilerV100Impl::setReadSections
virtual void setReadSections(OdUInt64 nSections)
OdGsFilerV100Impl::m_regPtrs
RegPtrsSet m_regPtrs
Definition: GsFilerV100Impl.h:360
OdGsFilerV100Impl::setVersion
virtual void setVersion(OdUInt32 nVersion)
OdGsFilerV100Impl::isReadSection
virtual bool isReadSection(Section section) const
OdGsFiler_SubstitutorImpl::VoidsSet::m_pVoid
void * m_pVoid
Definition: GsFilerV100Impl.h:89
OdGsFilerV100Impl::setSubstitutor
virtual void setSubstitutor(OdRxObject *pSubst)
OdBinaryData
Definition: OdBinaryData.h:42
OdIfc::kV2
@ kV2
Definition: IfcAttributesEnum.h:1296
OdGsFilerV100Impl::setReadSection
virtual void setReadSection(Section section, bool bSet)
OdGsFilerV100Impl::clearRegisteredPtrs
virtual void clearRegisteredPtrs()
OdRxObject
Definition: RxObject.h:564
OdGsFiler_SubstitutorImpl::VoidsSet
Definition: GsFilerV100Impl.h:88
OdGsFilerV100Impl::WrSectionData::m_type
OdGsFiler::Section m_type
Definition: GsFilerV100Impl.h:344
OdGsFilerDbLinker::~OdGsFilerDbLinker
virtual ~OdGsFilerDbLinker()
Definition: GsFilerV100Impl.h:41
GeExtents3d.h
OdGsFiler_SubstitutorImpl::Procs::subst
static void subst(OdGsFiler_SubstitutorImpl &impl, const void *pValue, void *pPlace, OdGsFiler::SubstitutionActuator *pAct, const void *pSubstitution, bool bClear)
Definition: GsFilerV100Impl.h:138
OdaSTL.h
SETBIT
#define SETBIT(flags, bit, value)
Definition: OdaDefs.h:497
OdGsFilerV100Impl::m_sectionStack
OdStack< WrSectionData > m_sectionStack
Definition: GsFilerV100Impl.h:355
OdGsFilerV100Impl::wrHandle
virtual void wrHandle(OdDbStub *pHandle)
OdGsFilerV100Impl
Definition: GsFilerV100Impl.h:327
OdGsFilerV100Impl::m_pLinker
OdGsFilerDbLinkerPtr m_pLinker
Definition: GsFilerV100Impl.h:336
OdGsFiler_SubstitutorImpl::Procs::SubstMap
std::map< ProcTyp, VoidArry > SubstMap
Definition: GsFilerV100Impl.h:128
OdGsFilerV100Impl::m_arbData
ArbDataMap m_arbData
Definition: GsFilerV100Impl.h:358
OdGsFilerV100Impl::setArbitraryData
virtual void setArbitraryData(const OdChar *pName, OdRxObject *pObject)
OdGsFiler_SubstitutorImpl::Procs
Definition: GsFilerV100Impl.h:125
OdGsFilerV100Impl::m_nSectionsToRead
OdUInt64 m_nSectionsToRead
Definition: GsFilerV100Impl.h:338
OdGsFilerV100Impl::rdRawData
virtual void rdRawData(void *pData, OdUInt32 nDataSize) const
OdGsFiler_SubstitutorImpl::m_regs
RegsMap m_regs
Definition: GsFilerV100Impl.h:121
TD_PackPop.h
OdGsFiler_SubstitutorImpl::VoidArry::at
VoidsSet * at(OdInt32 n)
Definition: GsFilerV100Impl.h:103
OdGsFilerDbLinker::handleToDbStub
virtual OdDbStub * handleToDbStub(OdUInt64 nHandle) const =0
OdGsFiler_SubstitutorImpl::VoidArry::kill
void kill(void *pVoid)
OdGsFilerV100Impl::ArbDataMap
std::map< OdString, OdRxObjectPtr > ArbDataMap
Definition: GsFilerV100Impl.h:357
OdGsFilerV100Impl::getStream
virtual OdStreamBufPtr getStream() const
OdGsFiler_SubstitutorImpl::VoidArry::clear
void clear()
OdGsFilerV100Impl::isWriting
bool isWriting() const
Definition: GsFilerV100Impl.h:362
OdGsFiler_SubstitutorImpl::clearSubstitutions
virtual void clearSubstitutions(const void *pValue=NULL, OdUInt32 size=0)
OdGsFiler_SubstitutorImpl::AbstractTyp
Definition: GsFilerV100Impl.h:115
OdGsFilerV100Impl::rdHandle
virtual OdDbStub * rdHandle() const
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
size
GLsizeiptr size
Definition: gles2_ext.h:182
OdGsFilerV100Impl::WrSectionData::WrSectionData
WrSectionData(OdGsFiler::Section section, OdUInt32 tell)
Definition: GsFilerV100Impl.h:350
OdGsFilerV100Impl::isWriteSection
virtual bool isWriteSection(Section section) const
OdGsFilerV100Impl::wrEOFSection
virtual void wrEOFSection()
OdGsFilerV100Impl::Flags
Flags
Definition: GsFilerV100Impl.h:329
OdGsFiler_SubstitutorImpl::VoidArry::contains
bool contains(void *pVoid)
OdGsFilerV100Impl::OdGsFilerV100Impl
OdGsFilerV100Impl()
Definition: GsFilerV100Impl.h:368
OdGsFilerV100Impl::makeSubstitutions
virtual void makeSubstitutions(bool bClear=true) const
OdGsFilerV100Impl::checkDbHash
virtual bool checkDbHash(const OdDbBaseDatabase *pDb)
OdGsFiler_SubstitutorImpl::DataTyp
Definition: GsFilerV100Impl.h:67
OD_TYPENAME
#define OD_TYPENAME
Definition: OdPlatform.h:581
OdGsFiler_SubstitutorImpl::VoidArry::add
void add(void *pVoid, OdGsFiler::SubstitutionActuator *pAct)
OdGsFiler_SubstitutorImpl::Procs::RegMap
std::map< ProcTyp, ProcTyp > RegMap
Definition: GsFilerV100Impl.h:127
OdGsFilerV100Impl::WrSectionData::m_begin
OdUInt64 m_begin
Definition: GsFilerV100Impl.h:345
OdGsFilerV100Impl::m_nCurSection
Section m_nCurSection
Definition: GsFilerV100Impl.h:341
OdSmartPtr< OdGsFilerDbLinker >
OdGsFiler_SubstitutorImpl::registerSubstitution
virtual void registerSubstitution(const void *pValue, const void *pSubstitution, OdUInt32 size=sizeof(OdIntPtr), bool bRegister=true, bool bImmediate=false)
OdGsFilerV100Impl::WrSectionData::WrSectionData
WrSectionData()
Definition: GsFilerV100Impl.h:346
OdDAI::operator!=
bool DAI_EXPORT operator!=(const OdDAI::OdSelect &left, const OdDAI::OdSelect &right)
OdGsFilerV100Impl::m_subst
OdSmartPtr< OdGsFiler_SubstitutorImpl > m_subst
Definition: GsFilerV100Impl.h:356
OdGsFilerV100Impl::headerTestChunk
OdUInt32 headerTestChunk() const
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdGsFiler_SubstitutorImpl::VoidArry::m_nVoids
OdInt32 m_nVoids
Definition: GsFilerV100Impl.h:94
OdGsFilerV100Impl::curSection
virtual Section curSection() const
OdGsFiler::Substitutor
Definition: GsFiler.h:108
OdGsFilerDbLinker::OdGsFilerDbLinker
OdGsFilerDbLinker()
Definition: GsFilerV100Impl.h:40
OdGsFilerDbLinker::getDatabase
virtual OdDbBaseDatabase * getDatabase(OdDbStub *pStub) const =0
OdGsFilerV100Impl::wrHeaderSection
void wrHeaderSection()
OdGsFiler_SubstitutorImpl::requestSubstitution
virtual void requestSubstitution(void *pPlace, const void *pValue, OdUInt32 size=sizeof(OdIntPtr), bool bRegister=true, bool bImmediate=true)
operator>
bool operator>(const OdString &s1, const OdString &s2)
Definition: OdString.h:1307
OdGsFilerV100Impl::assertRd
void assertRd() const
Definition: GsFilerV100Impl.h:366
OdGsFilerV100Impl::clearArbitraryData
virtual void clearArbitraryData()
DbBaseDatabase.h
OdGsFilerV100Impl::wrRawData
virtual void wrRawData(const void *pData, OdUInt32 nDataSize)
OdChar
wchar_t OdChar
Definition: OdPlatformSettings.h:745
operator>=
bool operator>=(const OdString &s1, const OdString &s2)
Definition: OdString.h:1351
OdGsFiler_SubstitutorImpl::Procs::runSubst
static void runSubst(void *pPlace, const void *pSubstitution, OdGsFiler::SubstitutionActuator *pActuator)
Definition: GsFilerV100Impl.h:133
OdGsFilerV100Impl::rdHeaderSection
bool rdHeaderSection()
OdGsFilerV100Impl::assertWr
void assertWr() const
Definition: GsFilerV100Impl.h:365
OdGsFilerV100Impl::m_pStream
OdStreamBufPtr m_pStream
Definition: GsFilerV100Impl.h:335
TD_PackPush.h
OdGsFiler_SubstitutorImpl::~OdGsFiler_SubstitutorImpl
~OdGsFiler_SubstitutorImpl()
Definition: GsFilerV100Impl.h:322
OdGsFiler_SubstitutorImpl::requestSubstitution
virtual void requestSubstitution(OdBaseObjectPtr *pPlace, const void *pValue, bool bRegister=true, bool bImmediate=true)
OdStack
Definition: OdStack.h:56
OdRxObjectImpl::createObject
static OdSmartPtr< TInterface > createObject()
Definition: RxObjectImpl.h:107
OdGsFilerV100Impl::m_nVersion
OdUInt32 m_nVersion
Definition: GsFilerV100Impl.h:340
operator<
bool operator<(const OdString &s1, const OdString &s2)
Definition: OdString.h:1284
OdGsFiler_SubstitutorImpl::g_defActuator
static OdGsFiler::SubstitutionActuator g_defActuator
Definition: GsFilerV100Impl.h:297
OdBaseObjectPtr
Definition: BaseObjectPtr.h:51
OdGsFiler_SubstitutorImpl::VoidArry::VoidArry
VoidArry()
Definition: GsFilerV100Impl.h:95
OdGsFilerV100Impl::checkEOF
virtual bool checkEOF() const
OdGsFilerV100Impl::setWriteSection
virtual void setWriteSection(Section section, bool bSet)
OdGsFilerV100Impl::~OdGsFilerV100Impl
~OdGsFilerV100Impl()
Definition: GsFilerV100Impl.h:378
GsFiler.h
OdGsFilerV100Impl::WrSectionData
Definition: GsFilerV100Impl.h:343
OdGsFilerV100Impl::m_nFlags
OdUInt32 m_nFlags
Definition: GsFilerV100Impl.h:339
OdGsFiler::Substitutor::clearSubstitutions
virtual void clearSubstitutions(const void *pValue=NULL, OdUInt32 size=0)=0
OdGsFilerV100Impl::registerPtr
virtual void registerPtr(const void *pPtr)
OdGsFilerV100Impl::setDatabase
virtual void setDatabase(const OdDbBaseDatabase *pDb)
OdIntPtr
ptrdiff_t OdIntPtr
Definition: OdPlatformSettings.h:884
OdGsFiler_SubstitutorImpl::requestSubstitution
virtual void requestSubstitution(void *pPlace, OdGsFiler::SubstitutionActuator *pActuator, const void *pValue, OdUInt32 size=sizeof(OdIntPtr), bool bRegister=true, bool bImmediate=true)
OdGsFilerV100Impl::wrClass
virtual void wrClass(OdRxObject *pObj)
OdStreamBuf
Definition: OdStreamBuf.h:67
OdGsFiler_SubstitutorImpl::Procs::req
static void req(OdGsFiler_SubstitutorImpl &impl, void *pPlace, OdGsFiler::SubstitutionActuator *pAct, const void *pValue, bool bRegister, bool bImmediate)
Definition: GsFilerV100Impl.h:244
ODA_ASSERT
#define ODA_ASSERT(exp)
Definition: DebugStuff.h:49
OdGsFiler_SubstitutorImpl::SubstsMap
std::map< OdUInt32, AbstractTyp > SubstsMap
Definition: GsFilerV100Impl.h:120
OdGsFilerDbLinker
Definition: GsFilerV100Impl.h:38
OdGsFilerDbLinker::stubToDbHandle
virtual OdUInt64 stubToDbHandle(OdDbStub *pStub) const =0
OdGsFilerDbLinker::getDbHash
virtual OdBinaryData getDbHash(const OdDbBaseDatabase *pDb) const
GS_TOOLKIT_EXPORT
#define GS_TOOLKIT_EXPORT
Definition: GsExport.h:37
OdGsFilerV100Impl::RegPtrsSet
std::set< const void * > RegPtrsSet
Definition: GsFilerV100Impl.h:359
OdError
Definition: OdError.h:43
OdGsFilerV100Impl::getDatabase
virtual OdDbBaseDatabase * getDatabase() const
OdGsFilerV100Impl::m_nSectionsToWrite
OdUInt64 m_nSectionsToWrite
Definition: GsFilerV100Impl.h:337
OdDAI::operator==
bool DAI_EXPORT operator==(const OdFileDescriptionAuto &left, const OdFileDescriptionAuto &right)
OdGsFilerV100Impl::rdClass
virtual OdRxObjectPtr rdClass() const
OdGsFiler_SubstitutorImpl::m_substs
SubstsMap m_substs
Definition: GsFilerV100Impl.h:122
OdGsFilerV100Impl::setWriteSections
virtual void setWriteSections(OdUInt64 nSections)
OdGsFilerDbLinker::getDatabase
virtual OdDbBaseDatabase * getDatabase() const =0
OdGsFiler_SubstitutorImpl::DataTyp::m_data
OdUInt8 m_data[nBytes]
Definition: GsFilerV100Impl.h:68
GeMatrix3d.h
OdGsFiler_SubstitutorImpl::Procs::reg
static void reg(OdGsFiler_SubstitutorImpl &impl, const void *pValue, const void *pSubstitution, bool bRegister, bool bImmediate)
Definition: GsFilerV100Impl.h:231
OdGsFilerV100Impl::setStream
virtual bool setStream(OdStreamBuf *pStream, bool bWrite=false)
OdGsFiler
Definition: GsFiler.h:63
OdGsFiler_SubstitutorImpl::VoidArry::~VoidArry
~VoidArry()
Definition: GsFilerV100Impl.h:101
RxObjectImpl.h
OdGsFilerV100Impl::getSubstitutor
virtual OdRxObjectPtr getSubstitutor() const
OdGsFiler_SubstitutorImpl::AbstractTyp::m_pContainer
void * m_pContainer
Definition: GsFilerV100Impl.h:116
OdGsFiler_SubstitutorImpl::Procs::ProcTyp
OdGsFiler_SubstitutorImpl::DataTyp< nBytes > ProcTyp
Definition: GsFilerV100Impl.h:126
OdStack.h
OdGsFilerV100Impl::hasArbitraryData
virtual bool hasArbitraryData(const OdChar *pName) const
OdGsFiler_SubstitutorImpl::VoidArry
Definition: GsFilerV100Impl.h:93
OdGsFiler::Section
Section
Definition: GsFiler.h:71
OdUInt64
Definition: Int64.h:137
OdGsFiler_SubstitutorImpl::Procs::makeSubst
static void makeSubst(void *pPlace, const void *pSubstitution)
Definition: GsFilerV100Impl.h:129