CFx SDK Documentation  2022 SP0
Public Member Functions | Friends | List of all members
OdDbHistoryManager Class Reference

#include <DbHistoryManager.h>

Public Member Functions

OdUInt32 revision ()
 
bool getLogMessage (OdUInt32 revision, OdDbHistoryLogRecord &log)
 
bool setLogMessage (OdUInt32 revision, const OdDbHistoryLogRecord &log)
 
void getChangedObjects (OdUInt32 revision, OdDbHandleArray &ids)
 
OdStreamBufPtr getChanges (OdUInt32 revisions, bool rollback=false)
 
OdDbHandleMap applyChanges (OdStreamBuf *changes, bool bPreserveHandles, OdDbHandleMap *clientMap=0, OdDbHandleMap *serverMap=0)
 
OdUInt32 lastSyncRevision ()
 
void setLastSyncRevision (OdUInt32)
 

Friends

class OdDbDatabaseImpl
 

Detailed Description

Definition at line 43 of file DbHistoryManager.h.

Member Function Documentation

◆ applyChanges()

OdDbHandleMap OdDbHistoryManager::applyChanges ( OdStreamBuf changes,
bool  bPreserveHandles,
OdDbHandleMap clientMap = 0,
OdDbHandleMap serverMap = 0 
)

Apply the changes received from OdDbHistoryManager.changes (maybe in the copied database)

Parameters
changes[in] Binary stream containing the changes
bPreserveHandles[in] If true then the new objects in the changes stream retain their handles, otherwise they may be translated
clientMap[in, optional] If present, it represents the changes in handles caused by merging server changes on a client. May be used to find erased added objects while reapplying client changes
serverMap[in, optional] If present, it represents the changes in handles caused by merging client changes on a server. The target handles in this map will be used for the new objects added while reapplying client changes.

Returns the map of the newly added objects handles [handle read from the stream] -> [actual handle in the database]

◆ getChangedObjects()

void OdDbHistoryManager::getChangedObjects ( OdUInt32  revision,
OdDbHandleArray ids 
)

Objects changed in the given revision. Array is not cleared, handles are appended to the end.

◆ getChanges()

OdStreamBufPtr OdDbHistoryManager::getChanges ( OdUInt32  revisions,
bool  rollback = false 
)

Return the changes made in the last revisions as a portable binary stream.

Parameters
revisions[in] Number of revisions to get
rollback[in] If true, then these revisions are reverted in database (e.g. to be reapplied after other changes)

◆ getLogMessage()

bool OdDbHistoryManager::getLogMessage ( OdUInt32  revision,
OdDbHistoryLogRecord log 
)

Additional details associated with the given revision, such as log message, timestamp, etc. Returns false if the given revision does not exist.

◆ lastSyncRevision()

OdUInt32 OdDbHistoryManager::lastSyncRevision ( )

Last version synchronized with the server.

◆ revision()

OdUInt32 OdDbHistoryManager::revision ( )

Current revision number.

◆ setLastSyncRevision()

void OdDbHistoryManager::setLastSyncRevision ( OdUInt32  )

Set the last version synchronized with the server. (Presumably, after applying changes and resolving conflicts)

◆ setLogMessage()

bool OdDbHistoryManager::setLogMessage ( OdUInt32  revision,
const OdDbHistoryLogRecord log 
)

Associate additional details with the given revision, such as log message, timestamp, etc. Returns false if the given revision does not exist.

Friends And Related Function Documentation

◆ OdDbDatabaseImpl

friend class OdDbDatabaseImpl
friend

Definition at line 97 of file DbHistoryManager.h.


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