CFx SDK Documentation  2020SP3
OdStreamBuf.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 ODSTREAMBUF_DEFINED
28 #define ODSTREAMBUF_DEFINED
29 
30 #if !defined( FX_PREVIEW )
31 #include "RxObject.h"
32 
33 #include "TD_PackPush.h"
34 
35 class OdString;
36 #else
37 #include <stdio.h>
38 #include <string>
39 #include "OdPlatformSettings.h"
40 #endif
41 
46 namespace OdDb
47 {
49  {
50  kSeekFromStart = SEEK_SET, // Start of file.
51  kSeekFromCurrent = SEEK_CUR, // Current position of file pointer.
52  kSeekFromEnd = SEEK_END // End of file.
53  };
54 }
55 
62 #if !defined( FX_PREVIEW )
64 #else
65 class OdStreamBuf
66 #endif
67 {
68 protected:
70 public:
71 #if !defined( FX_PREVIEW )
73 #endif
74 
78 #if !defined( FX_PREVIEW )
79  virtual OdString fileName();
80 #else
81  virtual std::wstring fileName();
82 #endif
83 
88  virtual bool isEof();
93  virtual OdUInt64 tell();
98  virtual OdUInt64 length();
99 
104  virtual void truncate();
109  virtual void rewind();
128 
133  virtual OdUInt8 getByte();
140  virtual void getBytes(void* buffer, OdUInt32 numBytes);
141 
147  virtual void putByte(OdUInt8 value);
154  virtual void putBytes(const void* buffer, OdUInt32 numBytes);
155 
164  virtual void copyDataTo(OdStreamBuf* pDestination, OdUInt64 sourceStart = 0, OdUInt64 sourceEnd = 0);
180 };
184 #if !defined( FX_PREVIEW )
186 
187 #include "TD_PackPop.h"
188 #endif
189 
190 #endif //ODSTREAMBUF_DEFINED
191 
FIRSTDLL_EXPORT
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
OdStreamBuf::seek
virtual OdUInt64 seek(OdInt64 offset, OdDb::FilerSeekType seekType)
OdString
Definition: OdString.h:95
OdStreamBuf::getBytes
virtual void getBytes(void *buffer, OdUInt32 numBytes)
OdDb::kSeekFromCurrent
@ kSeekFromCurrent
Definition: OdStreamBuf.h:51
OdUInt8
unsigned char OdUInt8
Definition: OdPlatformSettings.h:759
OdStreamBuf::truncate
virtual void truncate()
OdInt64
Definition: Int64.h:43
OdStreamBuf::OdStreamBuf
OdStreamBuf()
buffer
GLuint buffer
Definition: gles2_ext.h:178
OdRxObject
Definition: RxObject.h:564
OdStreamBuf::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdStreamBuf)
TD_PackPop.h
OdDb::FilerSeekType
FilerSeekType
Definition: OdStreamBuf.h:49
RxObject.h
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdStreamBuf::length
virtual OdUInt64 length()
OdSmartPtr< OdStreamBuf >
OdDb::kSeekFromStart
@ kSeekFromStart
Definition: OdStreamBuf.h:50
offset
GLintptr offset
Definition: gles2_ext.h:183
OdStreamBuf::tell
virtual OdUInt64 tell()
OdStreamBuf::putBytes
virtual void putBytes(const void *buffer, OdUInt32 numBytes)
OdPlatformSettings.h
OdStreamBuf::rewind
virtual void rewind()
TD_PackPush.h
OdStreamBuf::getByte
virtual OdUInt8 getByte()
OdStreamBuf::isEof
virtual bool isEof()
OdStreamBuf::fileName
virtual OdString fileName()
OdStreamBuf::getShareMode
virtual OdUInt32 getShareMode()
OdDb::kSeekFromEnd
@ kSeekFromEnd
Definition: OdStreamBuf.h:52
OdStreamBuf::copyDataTo
virtual void copyDataTo(OdStreamBuf *pDestination, OdUInt64 sourceStart=0, OdUInt64 sourceEnd=0)
OdStreamBuf::putByte
virtual void putByte(OdUInt8 value)
OdStreamBuf
Definition: OdStreamBuf.h:67
OdDb
Definition: Db2dPolyline.h:50
value
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
OdStreamBufPtr
OdSmartPtr< OdStreamBuf > OdStreamBufPtr
Definition: OdStreamBuf.h:185
OdUInt64
Definition: Int64.h:137