CFx SDK Documentation  2023 SP0
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_
virtual bool init(OdStreamBuf *file, OdSmDatabase *pDb, bool bForWrite)=0
virtual bool readInt(long &)=0
virtual bool readRawData(OdStreamBuf *pStreamBuf)=0
virtual void writeObject(const OdSmPersist *pObj)=0
virtual bool readString(OdString &)=0
virtual void pushCurrentReadObject(const OdSmPersist *pObj)=0
virtual void popCurrentReadObject(bool bSuccess)=0
virtual void writeDouble(double pDbl)=0
virtual void writeProperty(const OdString &pPropname, const OdVariant &pVal)=0
virtual void close()=0
virtual bool readGuid(GUID &)=0
virtual void writeString(const OdString &s)=0
virtual OdSmDatabase * getDatabase()=0
virtual void writeRawData(OdStreamBuf *pStreamBuf)=0
virtual void writeInt(long pInt)=0
virtual void writeReference(const OdSmObjectReference *)=0
virtual bool readReference(OdSmObjectReference *)=0
virtual bool readDouble(double &)=0
virtual bool readProperty(OdString &ppPropname, OdVariant &pVal)=0
virtual void writeGuid(const GUID &id)=0
virtual const OdSmPersist * getCurrentObject() const =0
virtual OdSmPersist * readObject()=0