CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OdStreamBuf.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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
35class OdString;
36#else
37#include <stdio.h>
38#include <string>
39#include "OdPlatformSettings.h"
40#endif
41
46namespace 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
65class OdStreamBuf
66#endif
67{
68protected:
70public:
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
unsigned int OdUInt32
unsigned char OdUInt8
OdSmartPtr< OdStreamBuf > OdStreamBufPtr
Definition: OdStreamBuf.h:185
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
Definition: Int64.h:43
virtual OdUInt8 getByte()
ODRX_DECLARE_MEMBERS(OdStreamBuf)
virtual void rewind()
virtual OdUInt64 tell()
virtual OdString fileName()
virtual OdUInt64 length()
virtual void getBytes(void *buffer, OdUInt32 numBytes)
virtual void truncate()
virtual bool isEof()
virtual void copyDataTo(OdStreamBuf *pDestination, OdUInt64 sourceStart=0, OdUInt64 sourceEnd=0)
virtual OdUInt32 getShareMode()
virtual OdUInt64 seek(OdInt64 offset, OdDb::FilerSeekType seekType)
virtual void putByte(OdUInt8 value)
virtual void putBytes(const void *buffer, OdUInt32 numBytes)
GLuint buffer
Definition: gles2_ext.h:178
GLintptr offset
Definition: gles2_ext.h:183
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
FilerSeekType
Definition: OdStreamBuf.h:49
@ kSeekFromCurrent
Definition: OdStreamBuf.h:51
@ kSeekFromStart
Definition: OdStreamBuf.h:50
@ kSeekFromEnd
Definition: OdStreamBuf.h:52