CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OleStorage.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#ifndef _ODSTORAGE_INCLUDED_
26#define _ODSTORAGE_INCLUDED_
27
28#include "RxObject.h"
29#include "OdStreamBuf.h"
30#include "OdErrorContext.h"
31
32#include "TD_PackPush.h"
33
41{
42public:
44
53 virtual SizeType readAt(SizeType start, OdUInt8 *buffer, SizeType bufferSize) const = 0;
54
60 virtual SizeType writeAt(SizeType start, const OdUInt8 *buffer, SizeType bufferSize) = 0;
61
65 virtual SizeType size() const = 0;
70 virtual void resize(SizeType bufferSize) = 0;
71
75 virtual void flush() = 0;
76};
77
82
83
91{
92public:
95 OdOleStorageError(OdErrorContext* pErrorContext) : OdError(pErrorContext) { }
96};
97
98class OdOleStorage;
103
111{
112public:
114
129 virtual void init(OdByteData* pByteData, int accessMode = Oda::kFileRead) = 0;
130
134 virtual OdByteDataPtr rawData() const = 0;
135
158 virtual OdStreamBufPtr openStream(const OdString &filename,
159 bool createIfNotFound = false,
160 int accessMode = Oda::kFileRead) = 0;
161
167};
168
169#define ODRX_OLESTORAGE_SERVICE_NAME OdOleStorage::desc()->name()
170
171#include "TD_PackPop.h"
172
173#endif // _ODSTORAGE_INCLUDED_
unsigned int OdUInt32
unsigned char OdUInt8
OdSmartPtr< OdOleStorage > OdOleStoragePtr
Definition: OleStorage.h:102
OdSmartPtr< OdByteData > OdByteDataPtr
Definition: OleStorage.h:81
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
virtual void resize(SizeType bufferSize)=0
virtual SizeType readAt(SizeType start, OdUInt8 *buffer, SizeType bufferSize) const =0
virtual void flush()=0
OdUInt32 SizeType
Definition: OleStorage.h:43
virtual SizeType size() const =0
ODRX_DECLARE_MEMBERS(OdByteData)
virtual SizeType writeAt(SizeType start, const OdUInt8 *buffer, SizeType bufferSize)=0
OdOleStorageError(OdErrorContext *pErrorContext)
Definition: OleStorage.h:95
ODRX_DECLARE_MEMBERS(OdOleStorage)
virtual OdStreamBufPtr openStream(const OdString &filename, bool createIfNotFound=false, int accessMode=Oda::kFileRead)=0
virtual void init(OdByteData *pByteData, int accessMode=Oda::kFileRead)=0
virtual OdByteDataPtr rawData() const =0
static OdOleStoragePtr createServiceObject(OdByteData *pInitData)
GLuint buffer
Definition: gles2_ext.h:178