CFx SDK Documentation  2020SP3
SmFiler.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 
25 
26 
27 #ifndef _SmFiler_h_Included_
28 #define _SmFiler_h_Included_
29 
30 #include "RxObject.h"
31 #define STL_USING_STRING
32 #include "OdaSTL.h"
33 #include "Sm/SmObjectId.h"
34 #include <OdString.h>
35 #include <RxVariant.h>
36 #include <OdStreamBuf.h>
37 
38 #ifndef GUID_DEFINED
39 struct GUID;
40 #endif
41 
46 namespace dst
47 {
48  struct OdSmDatabase;
49  struct OdSmObjectReference;
50 
55  struct OdSmFiler : public OdRxObject
56  {
57  virtual bool init( OdStreamBuf* file, OdSmDatabase *pDb, bool bForWrite ) = 0;
58  virtual void close() = 0;
59  virtual OdSmDatabase* getDatabase() = 0;
60  // virtual void PushCurrentWriteObject( OdSmPersist * pObj ) = 0;
61  // virtual void PopCurrentWriteObject(long bSuccess ) = 0;
62  virtual void pushCurrentReadObject( const OdSmPersist * pObj ) = 0;
63  virtual void popCurrentReadObject( bool bSuccess ) = 0;
64  virtual const OdSmPersist* getCurrentObject() const = 0;
65  // virtual void GetCurrentObjectHeaderInfo( /*[out]*/ SAFEARRAY * * names, /*[out]*/ SAFEARRAY * * values ) = 0;
66  // virtual long GetRevisionNumber() = 0;
67  virtual OdSmPersist* readObject() = 0;
68  virtual bool readProperty( OdString& ppPropname, OdVariant& pVal ) = 0;
69  virtual bool readRawData( OdStreamBuf* pStreamBuf ) = 0;
70  virtual bool readReference( OdSmObjectReference* ) = 0;
71 
72  virtual void writeObject( const OdSmPersist* pObj ) = 0;
73  virtual void writeProperty(const OdString& pPropname, const OdVariant& pVal ) = 0;
74  virtual void writeRawData( OdStreamBuf* pStreamBuf ) = 0;
75  virtual bool readGuid( GUID& ) = 0;
76  virtual bool readInt( long& ) = 0;
77  virtual bool readDouble( double& ) = 0;
78  virtual bool readString( OdString& ) = 0;
79  // virtual void ReadBytes( /*[out]*/ unsigned char * * p, /*[in,out]*/ long * count ) = 0;
80  virtual void writeGuid( const GUID& id ) = 0;
81  virtual void writeInt( long pInt ) = 0;
82  virtual void writeDouble( double pDbl ) = 0;
83  virtual void writeString(const OdString& s ) = 0;
84  // virtual void WriteBytes( unsigned char * p, long count ) = 0;
85  virtual void writeReference( const OdSmObjectReference* ) = 0;
86  };
87 }
88 
89 #endif //_SmFiler_h_Included_
dst::OdSmFiler::writeString
virtual void writeString(const OdString &s)=0
OdString
Definition: OdString.h:95
dst::OdSmFiler::readGuid
virtual bool readGuid(GUID &)=0
dst::OdSmFiler::writeDouble
virtual void writeDouble(double pDbl)=0
dst::OdSmFiler::readString
virtual bool readString(OdString &)=0
dst::OdSmFiler::writeInt
virtual void writeInt(long pInt)=0
dst::OdSmFiler::readReference
virtual bool readReference(OdSmObjectReference *)=0
dst::OdSmFiler::popCurrentReadObject
virtual void popCurrentReadObject(bool bSuccess)=0
dst::OdSmDatabase
Definition: SmDatabase.h:52
OdRxObject
Definition: RxObject.h:564
dst::OdSmFiler::getDatabase
virtual OdSmDatabase * getDatabase()=0
OdaSTL.h
dst::OdSmFiler::writeRawData
virtual void writeRawData(OdStreamBuf *pStreamBuf)=0
dst::OdSmFiler
Definition: SmFiler.h:56
RxObject.h
dst::OdSmFiler::readProperty
virtual bool readProperty(OdString &ppPropname, OdVariant &pVal)=0
dst::OdSmFiler::readDouble
virtual bool readDouble(double &)=0
OdStreamBuf.h
OdString.h
dst::OdSmFiler::writeObject
virtual void writeObject(const OdSmPersist *pObj)=0
dst::OdSmFiler::writeGuid
virtual void writeGuid(const GUID &id)=0
SmObjectId.h
dst::OdSmFiler::close
virtual void close()=0
dst::OdSmFiler::readObject
virtual OdSmPersist * readObject()=0
dst::OdSmFiler::readInt
virtual bool readInt(long &)=0
dst::OdSmFiler::pushCurrentReadObject
virtual void pushCurrentReadObject(const OdSmPersist *pObj)=0
OdVariant
Definition: RxVariant.h:68
dst::OdSmFiler::init
virtual bool init(OdStreamBuf *file, OdSmDatabase *pDb, bool bForWrite)=0
dst::OdSmFiler::getCurrentObject
virtual const OdSmPersist * getCurrentObject() const =0
dst::OdSmPersist
Definition: SmPersist.h:52
dst
Definition: SmCalloutBlocks.h:39
dst::OdSmFiler::readRawData
virtual bool readRawData(OdStreamBuf *pStreamBuf)=0
dst::OdSmFiler::writeReference
virtual void writeReference(const OdSmObjectReference *)=0
OdStreamBuf
Definition: OdStreamBuf.h:67
dst::OdSmFiler::writeProperty
virtual void writeProperty(const OdString &pPropname, const OdVariant &pVal)=0
RxVariant.h