25#ifndef _OdDbRuntimeIOModule_H_
26#define _OdDbRuntimeIOModule_H_
43#define STL_USING_QUEUE
83template <
class TReference>
85 typedef std::pair<TReference, OdDbReferenceType> TypedReference;
86 typedef std::queue<TypedReference> RefQueueImp;
88 bool addHardRef, addOwnershipRef, addSoftRef;
90 OdDbReferenceQueue(
bool addOwnershipRef =
true,
bool addHardRef =
false,
bool addSoftRef =
false) {
91 this->addOwnershipRef = addOwnershipRef;
92 this->addHardRef = addHardRef;
93 this->addSoftRef = addHardRef;
95 size_t size()
const {
return queue.size(); }
98 void clear() { queue = RefQueueImp(); }
171template <
class TReference>
173 TReference referenceHandle;
174 if (!queue.empty()) {
175 TypedReference& reference = queue.front();
176 referenceHandle = reference.first;
178 *
type = reference.second;
182 return referenceHandle;
185template <
class TReference>
189 queue.push(TypedReference(
ref,
type));
OdSmartPtr< OdDbObject > OdDbObjectPtr
OdSmartPtr< OdDbRtFilerController > OdDbRtFilerControllerPtr
OdSmartPtr< OdDbRuntimeIOModule > OdDbRuntimeIOModulePtr
#define GETBIT(flags, bit)
FIRSTDLL_EXPORT OdRxSystemServices * odrxSystemServices()
OdDbReferenceQueue(bool addOwnershipRef=true, bool addHardRef=false, bool addSoftRef=false)
bool push(const TReference &ref, OdDbReferenceType type=kSoftPointer)
TReference pop(OdDbReferenceType *type=0)
virtual void copyObjectStream(const OdDbObjectId &id, OdStreamBuf &output, IdRefQueue *idrefQueue=0)=0
virtual void copyStream(OdStreamBuf &output, RefQueue *refQueue=0)=0
virtual void disableObjectCopyMapping(bool doIt=true)=0
ODRX_DECLARE_MEMBERS(OdDbRtFilerController)
OdDbReferenceQueue< OdDbStub * > IdRefQueue
virtual OdStreamBufPtr openStream(const OdString &name, Oda::FileAccessMode mode)=0
virtual OdDbObjectPtr readObject(OdStreamBuf &objectInStream, IdRefQueue *refQueue=0)=0
virtual OdDbDatabase * database()=0
virtual OdUInt64 readObjectSize(OdStreamBuf &input)=0
virtual void loadObjects(OdStreamBuf &objectStream, OdUInt64 endPos=0xFFFFFFFFFFFFFFFFULL)=0
virtual void writeObject(OdDbObject *obj, OdStreamBuf *output, RefQueue *refQueue=0)=0
virtual void reset(OdDbDatabase *db)=0
virtual void writeDataFrame(OdStreamBuf &output)=0
OdDbReferenceQueue< OdUInt64 > RefQueue
virtual OdUInt64 getObjectSize(OdUInt64 handle)=0
virtual OdUInt64 seekObject(OdUInt64 handle)=0
virtual OdUInt64 getObjectSize(OdStreamBuf &input)=0
void writeFile(OdDbDatabase *db, const OdString &fileName)
virtual OdUInt64 lookupOffset(OdDbStub *id)=0
void readFile(OdDbDatabase *db, const OdString &fileName, bool lazyObjectLoading)
virtual void loadDataFrame(OdStreamBuf &input)=0
virtual void copyObjectStream(OdUInt64 handle, OdStreamBuf &output, RefQueue *refQueue=0)=0
virtual void finishDataFrame(OdStreamBuf &output)=0
virtual void copyStream(OdStreamBuf &output, IdRefQueue *idrefQueue=0)=0
virtual void closeInput(bool finishDataLoading=false)=0
virtual void startDataFrame(OdStreamBuf &output, bool enableCopyMaping=true)=0
virtual void writeDbRoot(OdStreamBuf *output=0, OdDbRtFilerController::RefQueue *refQueue=0)=0
virtual OdUInt64 lookupOffset(OdUInt64 handle)=0
virtual void readFile(OdDbDatabase *db, const OdString &fileName, bool lazyObjectLoading=false)
virtual void writeFile(OdDbDatabase *db, const OdString &fileName)
GLuint const GLchar * name
GLuint GLsizei GLsizei GLint GLenum * type