CFx SDK Documentation  2023 SP0
Public Types | Public Member Functions | List of all members
OdDbPageController Class Referenceabstract

#include <DbPageController.h>

Inheritance diagram for OdDbPageController:
OdRxObject

Public Types

typedef OdInt64 Key
 

Public Member Functions

virtual int pagingType () const =0
 
virtual OdStreamBufPtr read (Key key)=0
 
virtual bool write (Key &key, OdStreamBuf *pStreamBuf)=0
 
virtual void setDatabase (OdDbDatabase *pDb)=0
 
virtual OdDbDatabasedatabase ()=0
 
virtual OdResult subPage (const OdDbObjectId &objectId)
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class controls the paging support for an OdDbDatabase instance.

See also
Paging Support odDbPageObjects

<group OdDb_Classes>

Definition at line 81 of file DbPageController.h.

Member Typedef Documentation

◆ Key

Definition at line 84 of file DbPageController.h.

Member Function Documentation

◆ database()

virtual OdDbDatabase* OdDbPageController::database ( )
pure virtual

Returns the OdDbDatabase instance served by this controller.

◆ pagingType()

virtual int OdDbPageController::pagingType ( ) const
pure virtual

Returns the paging type for this PageController object.

Remarks
pagingType() returns a combination of zero or more of the following:

Value Description OdDb::kUnload 0x01 Enable unloading for objects in a partially opened OdDbDatabase instance.
OdDb::kPage 0x02 Enable paging for objects in an OdDbDatabase instance.

See also
Paging Support

◆ read()

virtual OdStreamBufPtr OdDbPageController::read ( Key  key)
pure virtual

Pages in the specified data.

Remarks
Returns a SmartPointer to an OdDbStreamBuf object containing the specified paged data from a client-supplied data source.
Parameters
key[in] Paged data key, as returned by write().

◆ setDatabase()

virtual void OdDbPageController::setDatabase ( OdDbDatabase pDb)
pure virtual

Sets the OdDbDatabase instance served by this controller.

Parameters
pDb[in] Pointer to the database.
Remarks
The method is called by Teigha during initialization of database paging.

◆ subPage()

virtual OdResult OdDbPageController::subPage ( const OdDbObjectId objectId)
virtual

The method is called during unloading/paging of an object, before anything else is done.

Parameters
objectId[in] Object ID.
Remarks
subPage() returns one of the of the following:

Description eOk Continue paging. eSkipObjPaging Skip paging of the specified object. eStopPaging Stop paging.

Remarks
The default implementation does nothing but return eOk. This function can be overridden in custom classes.

◆ write()

virtual bool OdDbPageController::write ( Key key,
OdStreamBuf pStreamBuf 
)
pure virtual

Pages out data as required to a client-supplied data source.

Parameters
key[out] Paged data key, as used by read().
pStreamBuf[in] Pointer to the StreamBuf object from which the data are to be written.
Returns
Returns true if and only if the PageController implementation has successfully paged the data.
Remarks
Implementations of this function are expected to write the entire contents of pStreamBuf to an external data source, and to set assign a unique value to the key argument that identifies this chunk of paged data. This key value will be used in a subsequent calls to read() to retrieve this specific paged data.

The documentation for this class was generated from the following file: