InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDataBase Class Referenceabstract

#include <IDataBase.h>

Classes

struct  InstantiateFunctionObj
 
class  SaveRestoreModifiedState
 

Public Types

enum  DBResultCode {
  kNoError = 0, kUserCanceled, kUnknownError, kLowMemoryError,
  kFileDamagedError, kFileCorruptError, kFileNotFoundError, kFileIsOpenError,
  kFileIsReadOnlyError, kDiskFullError, kNotFoundError, kFileChangedError,
  kWrongVersionError, kFileIsNotOpenError, kInvalidFileFormatError, kTooManyFilesError,
  kOutstandingClonesSaveError, kOutstandingTransactionsSaveError, kDBMergeFailed, kDBModeSwitchFailed,
  kMiniSaveFileVerificationFailedError, kUserFileVerificationFailedError, kAccessDenied
}
 
enum  ByteSwapOrder { kSwapUnknown = 0, kIntelOrder, kMotorolaOrder }
 
enum  OpenFlags { kRead, kWrite, kCopy, kCopyEfficiently }
 
enum  SaveFlags { kSaveAs, kSaveACopy }
 
enum  ProtectionLevel { kDeleteAfterUse = -1, kNoProtection = 0, kProtectSave, kProtectMiniSave }
 
enum  UserFileMode { kUserFileExclusive = 0, kUserFileShared }
 
enum  CachePolicy { kAnnaCachePolicy, kFaultRateBasedPolicy, kCacheAllPolicy }
 
enum  UndoSupport { kNoUndoSupport, kFullUndoSupport, kPartialUndoSupport }
 
enum  FileRecoveryMode {
  kNoRecovery, kUsingPreTransMasterPage, kUsingLPMCoWorkerPage, kUsingXMPDataStripping,
  kUsingFixingInvalidTextStoryOrParcelMethod
}
 
typedef DBResultCode(* DBProgressFunction )(int32 stepsDone, int32 stepCount)
 
typedef InstantiateFunctionObjInstantiateFunction
 

Public Member Functions

virtual ~IDataBase ()
 
virtual UID NewUID (ClassID clsID)=0
 
virtual DBResultCode DeleteUID (UID id)=0
 
virtual DBResultCode UndeleteUID (UID id, ClassID clsID)=0
 
virtual DBResultCode DestroyDeletedUID (UID id)=0
 
virtual IPMUnknownInstantiate (UID id, PMIID interfaceID)=0
 
virtual IPMUnknownQueryInstance (UID id, PMIID interfaceID)=0
 
virtual bool8 IsValidUID (UID id) const =0
 
virtual UID GetRootUID () const =0
 
virtual ClassID GetClass (UID id) const =0
 
virtual IUIDIteratorNewUIDIterator (bool8 includeDeletedUIDs=kFalse) const =0
 
virtual void DeleteUIDIterator (IUIDIterator **iterator) const =0
 
virtual void AssertOnModification ()=0
 
virtual void AttachDataObserver (IDatabaseObserver *observer)=0
 
virtual void DetachDataObserver (IDatabaseObserver *observer)=0
 
virtual uint32 GetSaveCount () const =0
 
virtual bool16 IsReadOnly () const =0
 
virtual bool16 IsModified () const =0
 
virtual IDataBase::DBResultCode SetVersionNumber (const int32 &majorVersion, const int32 &minorVersion)=0
 
virtual void GetVersionNumber (int32 *majorVersion, int32 *minorVersion) const =0
 
virtual ByteSwapOrder GetByteSwap () const =0
 
virtual const IDFileGetSysFile () const =0
 
virtual DBResultCode New (ProtectionLevel protLevel)=0
 
virtual DBResultCode Open (const IDFile &whatFile, ProtectionLevel protLevel, OpenFlags openFlag=kWrite)=0
 
virtual DBResultCode Revert ()=0
 
virtual DBResultCode Recover (const IDFile *damagedFile, ProtectionLevel protLevel, ProtectionLevel oldProtLevel, const IDFile *miniSaveFile=nil)=0
 
virtual DBResultCode Save ()=0
 
virtual DBResultCode SaveAs (const IDFile &destFile, SaveFlags saveFlag=kSaveAs)=0
 
virtual void SetModified (bool16 modified)=0
 
virtual void SetPlatformFileInfo (void *fileInfo)=0
 
virtual DBProgressFunction SetProgressCallback (DBProgressFunction callback)=0
 
virtual DBResultCode BeginTransaction ()=0
 
virtual DBResultCode EndTransaction ()=0
 
virtual int32 GetTransactionLevel () const =0
 
virtual ProtectionLevel GetProtectionLevel () const =0
 
virtual uint32 SetMiniSaveInterval (uint32 msecs)=0
 
virtual uint32 GetMiniSaveInterval () const =0
 
virtual const IDFileGetMiniSaveFile () const =0
 
virtual DBResultCode GetErrorCode ()=0
 
virtual void ClearError ()=0
 
virtual UID NewContiguousUID (uint16 type, bool16 externallyWritable)=0
 
virtual bool16 GetContiguousUIDChangeMarker (UID id) const =0
 
virtual void SetContiguousUIDChangeMarker (UID id, bool16 changed)=0
 
virtual void DestructInstance (UID id)=0
 
virtual void ClearDirty (IPMPersist *flushThis)=0
 
virtual void DirtyObject (IPMPersist *flushThis, ClassID clsID, ImplementationID tag, bool16 allowModification=kTrue, bool16 firstDirtyInterface=kTrue)=0
 
virtual void SetError (DBResultCode dbErrCode, const IDFile *userProvidedFile=nullptr)=0
 
virtual void PurgeMemory (int32 level)=0
 
virtual void AdviseMemoryState (int32 level)=0
 
virtual void RegisterRootObject (IPMUnknown *root)=0
 
virtual IPubFile * GetPubFile ()=0
 
virtual void IterateInstantiatedObjects (IInstanceProcessor *i)=0
 
virtual InstanceProfiler * NewInstanceProfiler ()=0
 
virtual DBResultCode GetCreationTime (IDTime &gt)=0
 
virtual DBResultCode GetModificationTime (IDTime &gt)=0
 
virtual uint64 GetSequenceNumberAtOpen () const =0
 
virtual uint64 GetCurrentSequenceNumber () const =0
 
virtual uint32 GetCacheFaultRate () const =0
 
virtual uint32 GetCacheTotalFaults () const =0
 
virtual CachePolicy GetCachePolicy () const =0
 
virtual void SetCachePolicy (CachePolicy policy)=0
 
virtual const IDFileGetSysFileFromOpen () const =0
 
virtual UndoSupport GetUndoSupport () const =0
 
virtual IDBChangesMonitor * GetDBChangesMonitor () const =0
 
virtual IDatabaseSnapshotGetLastDBSnapshotBeforePubFileSharing () const =0
 
virtual void SetDBChangesMonitor (IDBChangesMonitor *dbChangesMonitor, UndoSupport undoSupport)=0
 
virtual void SetFauxUserFile (const IDFile &newFile)=0
 
virtual bool16 IsFauxUserFile () const =0
 
virtual bool16 PlacementNewUID (ClassID clsID, UID id)=0
 
virtual bool16 PlacementUIDIsAvailable (UID id)=0
 
virtual void FlushDirtyObjectsForRIDXQuery ()=0
 
virtual IDataBaseClone ()=0
 
virtual DatabaseSnapshotPtr CloneADatabaseSnapshot ()=0
 
virtual bool SwitchExecutionContext ()=0
 
virtual bool PrepareForExecutionContextSwitch ()=0
 
virtual DBResultCode Merge (IDataBase *clone)=0
 
virtual DBResultCode DestroyDeletedUID_AfterLastReferenceIsReleased (UID id)=0
 
virtual void AllowPurge ()=0
 
virtual void DisallowPurge ()=0
 
virtual void DoScheduledPurge ()=0
 
virtual bool IsPurgeAllowed () const =0
 
virtual DBResultCode AttemptMiniSave ()=0
 
virtual bool PubFileIsShared () const =0
 
virtual PMString GetDocumentID ()=0
 
virtual InstantiateFunction SetInstantiateFunction (InstantiateFunction overrideInstantiate=nil)=0
 
virtual InstantiateFunction GetInstantiateFunction () const =0
 

Detailed Description

A database is the underlying data structure used for storage of documents, preferences, books, etc. It handles allocation, serialization, deletion of objects in the files. It also handles caching of objects.

An IDataBase ptr is NOT a reference to a standard boss object. It is a virtual C++ class, but does not inherit from IPMUnknown.

Member Typedef Documentation

typedef DBResultCode(* IDataBase::DBProgressFunction)(int32 stepsDone, int32 stepCount)

Prototype for a progress callback to be installed with SetProgressCallback() below. If a callback returns something different than kNoError the database will cancel and return this error code.

Member Enumeration Documentation

Represents the endian/byte order of data stored in the database
Enumerator
kSwapUnknown 

never valid

kIntelOrder 

little endian

kMotorolaOrder 

big endian

Internal use only.

The return type for most DataBase methods
Enumerator
kNoError 

Success

kUserCanceled 

User cancelled the operation, such as with the cancel button on a progress bar

kUnknownError 

Catch-all error code not handled elsewhere

kLowMemoryError 

Insufficient memory

kFileDamagedError 

File damaged but may be recoverable

kFileCorruptError 

File damaged and is not recoverable

kFileNotFoundError 

File not found

kFileIsOpenError 

File is already open

kFileIsReadOnlyError 

File is read-only

kDiskFullError 

Disk is full or insufficient disk space to complete operation

kNotFoundError 

File not found

kFileChangedError 

An edited but unsaved file could not be recovered because the original file on disk was already changed by another user

kWrongVersionError 

Wrong version

kFileIsNotOpenError 

File is not open

kInvalidFileFormatError 

File format invalid - magic bytes don't match.

See Also
DBUtils::SetMagicBytes
kTooManyFilesError 

The database cannot open another file because too many are already open.

See Also
DBUtils::GetAvailableNewDatabases
kOutstandingClonesSaveError 

The database cannot be saved at this point because it has outstanding clones.

kOutstandingTransactionsSaveError 

The database cannot be saved at this point because it has outstanding transactions

kDBMergeFailed 

The database cannot be merged with clone.

kDBModeSwitchFailed 

We could not switch modes (read only shared or read write exclusive) on the underlying file

kMiniSaveFileVerificationFailedError 

File damaged and is not recoverable - size too small

Flags to determine how to a database is opened
Enumerator
kRead 

Opened for read only

kWrite 

Opened for reading and writing

kCopy 

Open a copy. The original file is opened read-only only long enough to copy out the contents, after which it is closed and the database is considered unsaved

kCopyEfficiently 

For Internal Use Only - Same as kCopy, but with a twist to make copying more efficient.

Selecting the protection level of a database allows you to trade off performance and file-size versus fault-tolerance level when dealing with databases, depending on how important the data is in the database.
Enumerator
kDeleteAfterUse 

File will get deleted after use. This is the fastest mode. Basically this is the same as kNoProtection, only creation and deletion is faster. The file cannot be re-opened once it is closed.

kNoProtection 

The data is not protected on disk. It is often buffered in memory, and written out only as needed. This is fastest, and also produces the smallest files on disk. However, these databases need to be properly closed to be re-opened. No recovery operations are supported.

kProtectSave 

Database is fault-tolerant, recoverable to the point of the last Save or Save-As operation. This is somewhat slower than kNoProtection and also can produce larger files on disk after multiple Saves (but you can compact the database file by doing a save-as or save-a-copy operation).

kProtectMiniSave 

Database is fault-tolerant and recoverable to the point of the last save, save-as, or periodic mini-save operation, whichever happened last. This is the highest level of protection and also the slowest.

Flags to determine how a database is saved
Enumerator
kSaveAs 

Do a save-as, which changes the database's user file to be the save target file

kSaveACopy 

Save a copy only if the current database content

The return type of GetUndoSupport

There are three kinds: kNoUndoSupport : when the database has no support for tracking UID changes.

kFullUndoSupport : when the database has support for tracking UID changes and the database is revisioned so that when undo is invoked, older revisions of the database a restored.

kPartialUndoSupport : when the database has support for tracking UID changes but no revisioning. This means that when errors occurr, a transaction is reverted through automatic error handling. However, once a transaction is committed, it becomes irreversible.

Internal use only.

Constructor & Destructor Documentation

virtual IDataBase::~IDataBase ()
inlinevirtual

The database destructor closes an open database, and thus there is no explicit Close() method. Note that any changes to the database made since the last Save()/SaveAs() are lost.

Member Function Documentation

virtual void IDataBase::AdviseMemoryState (int32 level)
pure virtual

Internal use only.

virtual void IDataBase::AllowPurge ()
pure virtual

Internal Use only

virtual void IDataBase::AssertOnModification ()
pure virtual

Internal use only.

virtual void IDataBase::AttachDataObserver (IDatabaseObserverobserver)
pure virtual

Attaches an observer to the database. The observer will be called when certain database operations happen.

See Also
IDataBaseObserver.h for a list of notifications.
Parameters
observerto attach
virtual DBResultCode IDataBase::BeginTransaction ()
pure virtual

Starts a transaction. You should not normally need to call this directly. Changes to the document or preferences should be enclosed in Commands, and then this will be called for you by the command maanger. If you change the database via direct modifications it may result in corrupted documents. If you receive an assert about a database change outside of a transaction it is usually caused by either a modification outside of a command, a command with an incorrect target, or a command that modifies more than one database. The appropriate solution is normally to use commands correctly as opposed to inserting a call to BeginTransaction which just alleviates the assert instead of addressing the underlying issue.

Returns
DBResultCode resulting error code
virtual void IDataBase::ClearDirty (IPMPersistflushThis)
pure virtual

Internal use only.

virtual void IDataBase::ClearError ()
pure virtual

Resets error state

virtual DBResultCode IDataBase::DeleteUID (UID id)
pure virtual

Marks the object with the given UID for deletion. The object can longer be instantiated. Existing references remain valid. You can use the command named kDeleteUIDCmdBoss as a client rather than call this.

Parameters
UIDof the object to delete
Returns
DBResultCode the resulting error code
virtual void IDataBase::DeleteUIDIterator (IUIDIterator ** iterator) const
pure virtual

Delete an UIDIterator. Every call NewUIDIterator must have a matching call to DeleteUIDIterator.

Parameters
iteratorto delete.
virtual DBResultCode IDataBase::DestroyDeletedUID (UID id)
pure virtual

Frees up space for a previously deleted object with the given UID. The object can no longer be resurrected with UndeleteUID. This is normally called for you.

Parameters
UIDof the object to destroy
Returns
DBResultCode the resulting error code
virtual DBResultCode IDataBase::DestroyDeletedUID_AfterLastReferenceIsReleased (UID id)
pure virtual

Internal use only.

virtual void IDataBase::DestructInstance (UID id)
pure virtual

Internal use only.

virtual void IDataBase::DetachDataObserver (IDatabaseObserverobserver)
pure virtual

Detach an observer registered with AttachDataObserver. Every call to AttachDataObserver must have a matching call to DetachDataObserver.

Parameters
observerto detach
virtual void IDataBase::DirtyObject (IPMPersistflushThis,
ClassID clsID,
ImplementationID tag,
bool16 allowModification = kTrue,
bool16 firstDirtyInterface = kTrue 
)
pure virtual

Internal use only.

virtual DBResultCode IDataBase::EndTransaction ()
pure virtual

Ends a transaction. Note: There is no commit/rollback - EndTransaction implies a commit.

Returns
DBResultCode resulting error code
virtual void IDataBase::FlushDirtyObjectsForRIDXQuery ()
pure virtual

Internal use only.

virtual ByteSwapOrder IDataBase::GetByteSwap () const
pure virtual

Returns the byte order of the database

Returns
ByteSwapOrder endian order of the database
virtual uint32 IDataBase::GetCacheFaultRate () const
pure virtual

Internal use only.

virtual CachePolicy IDataBase::GetCachePolicy () const
pure virtual

Internal use only.

virtual uint32 IDataBase::GetCacheTotalFaults () const
pure virtual

Internal use only.

virtual ClassID IDataBase::GetClass (UID id) const
pure virtual

Get the class of the object.

Parameters
idof the object
Returns
ClassID that is associated with the UID, or kInvalidClass if there is no such UID or if it has been deleted.
virtual bool16 IDataBase::GetContiguousUIDChangeMarker (UID id) const
pure virtual

Internal use only.

virtual DBResultCode IDataBase::GetCreationTime (IDTimegt)
pure virtual

Gets the creation time of the database file

Parameters
gtSet to the creation time of the database file on success
Returns
DBResultCode resulting error code
virtual uint64 IDataBase::GetCurrentSequenceNumber () const
pure virtual

Internal use only.

virtual IDBChangesMonitor* IDataBase::GetDBChangesMonitor () const
pure virtual

Internal use only.

virtual PMString IDataBase::GetDocumentID ()
pure virtual

FOR INTERNAL USE ONLY FOR EXTERNAL USE : Recommended to use IAdobeMediaMgmtMetaData::GetDocumentID

Sets the document ID of a document. [OUT]: Returns the documentID of the document associated with the database.

virtual DBResultCode IDataBase::GetErrorCode ()
pure virtual

Gets the error information

Returns
DBError the error code associated with the previous action
virtual IDatabaseSnapshot* IDataBase::GetLastDBSnapshotBeforePubFileSharing () const
pure virtual

Internal use only.

virtual const IDFile* IDataBase::GetMiniSaveFile () const
pure virtual

Inquires the temporary file used for mini save, recovery, and spill from memory

Returns
IDFile* the file used for mini save
virtual uint32 IDataBase::GetMiniSaveInterval () const
pure virtual

Returns the current interval (in milliseconds) in which the database performs it's mini-save

Returns
uint32 the interval
virtual DBResultCode IDataBase::GetModificationTime (IDTimegt)
pure virtual

Gets the modification time of the database file

Parameters
gtSet to the modification time of the database file on success
Returns
DBResultCode resulting error code
virtual ProtectionLevel IDataBase::GetProtectionLevel () const
pure virtual

Gets the level of protection for the file Note: This value is defined at New/Open and there is no way to change it.

Returns
ProtectionLevel protection level
virtual IPubFile* IDataBase::GetPubFile ()
pure virtual

Internal use only.

virtual UID IDataBase::GetRootUID () const
pure virtual

Returns the root UID. This is the root object of the object hierarchy. For a document, it will return the kDocBoss (IDocument) object.

Returns
UID of the root object in the database
virtual uint32 IDataBase::GetSaveCount () const
pure virtual

Returns the number of times the database has been saved

Returns
uint32 save count
virtual uint64 IDataBase::GetSequenceNumberAtOpen () const
pure virtual

Internal use only.

virtual const IDFile* IDataBase::GetSysFile () const
pure virtual

Returns the file associated with the database (if the database has been opened or saved). Returns nil if there is no file associated yet.

Returns
IDFile* pointer to the file information.
virtual const IDFile* IDataBase::GetSysFileFromOpen () const
pure virtual

Support for better error handling. Returns the file that was used in the Open or Recover operation on the database. This is useful for better error handling because GetSysFile() return nil after Open() fails, yet we want to ask the database what IDFile the call failed on.

Returns
IDFile* the file that was used in the Open or Recover operation on the database, or nil if Open or Recover was never called.
virtual int32 IDataBase::GetTransactionLevel () const
pure virtual

Gets the current transaction level on this database. Client code typically has no need for this.

Returns
current transaction count
virtual UndoSupport IDataBase::GetUndoSupport () const
pure virtual

Returns the undo support type of the database.

virtual void IDataBase::GetVersionNumber (int32 * majorVersion,
int32 * minorVersion 
) const
pure virtual

Returns the version number of the application that was used to create the database

Parameters
int32*majorVersion major version number (return value!)
int32*minorVersion minor version number (return value!)
virtual IPMUnknown* IDataBase::Instantiate (UID id,
PMIID interfaceID 
)
pure virtual

Creates an in-memory version of the db-based object with the given UID, or simply returns a reference to the object if it is already instantiated. Does a QueryInterface for the requested interface. Returns nil if the UID doesn't exist, or if it's been deleted, or if the requested interface doesn't exist. Pass IID_IUNKNOWN if you don't care what interface you get. Normally this is called from InterfacePtr, instead of directly.

Parameters
idof the object to instantiate
interfaceIDwhich interface of the object to return
Returns
IPMUnknown* a pointer to the requested interface of the object (or nil)
virtual bool16 IDataBase::IsFauxUserFile () const
pure virtual

Internal use only.

virtual bool16 IDataBase::IsModified () const
pure virtual

Returns kTrue if the database has been modified since last save.

Returns
bool16 kTrue if the database has been modified since last save.
virtual bool16 IDataBase::IsReadOnly () const
pure virtual

Returns kTrue if the database was opened read only

Returns
bool16 kTrue if the database was opened read only
virtual bool8 IDataBase::IsValidUID (UID id) const
pure virtual

Returns kTrue if the given UID exists and is a reference to a valid object in the database. Returns false if the UID has never been allocated, or if it's been allocated and subsequently deleted. If it's been deleted, then undeleted, it returns true.

Parameters
idof the object
Returns
bool8 kTrue if the UID is allocated
virtual void IDataBase::IterateInstantiatedObjects (IInstanceProcessor * i)
pure virtual

Internal use only.

virtual DBResultCode IDataBase::New (ProtectionLevel protLevel)
pure virtual

Creates a new file.

Parameters
protLevelprotection level
Returns
resulting error code
virtual UID IDataBase::NewContiguousUID (uint16 type,
bool16 externallyWritable 
)
pure virtual

Internal use only.

virtual InstanceProfiler* IDataBase::NewInstanceProfiler ()
pure virtual

Internal use only.

virtual UID IDataBase::NewUID (ClassID clsID)
pure virtual

Creates a new persistent object in the database. Note that you can also use the NewUIDCmd (kNewUIDCmdBoss), which will handle the Undo for you.

Parameters
ClassIDfor the new object
Returns
UID of the newly created object.
virtual IUIDIterator* IDataBase::NewUIDIterator (bool8 includeDeletedUIDs = kFalse) const
pure virtual

Creates and returns a new UIDIterator. Use it to iterate over all UIDs in the database. Call DeleteUIDIterator when you are done with it. See UIDIterator.h

Parameters
includeDeletedUIDsfalse to skip over deleted UIDs, true otherwise
Returns
IUIDIterator the iterator
virtual DBResultCode IDataBase::Open (const IDFilewhatFile,
ProtectionLevel protLevel,
OpenFlags openFlag = kWrite 
)
pure virtual

Opens an existing file.

Parameters
whatFilefile to open
protLevelprotection level
openFlagopen read-only, writeable, or as a copy
Returns
resulting error code
virtual bool16 IDataBase::PlacementNewUID (ClassID clsID,
UID id 
)
pure virtual

Internal use only.

virtual bool16 IDataBase::PlacementUIDIsAvailable (UID id)
pure virtual

Internal use only.

virtual void IDataBase::PurgeMemory (int32 level)
pure virtual

Internal use only.

virtual IPMUnknown* IDataBase::QueryInstance (UID id,
PMIID interfaceID 
)
pure virtual

Like Instantiate(), but only returns a pointer if the requested interface is currently instantiated. If the interface would have to be accessed from the database, nil is returned.

Parameters
idof the object to instantiate
interfaceIDwhich interface of the object to return
Returns
IPMUnknown* a pointer to the requested interface of the object (or nil)
virtual DBResultCode IDataBase::Recover (const IDFiledamagedFile,
ProtectionLevel protLevel,
ProtectionLevel oldProtLevel,
const IDFileminiSaveFile = nil 
)
pure virtual

Recovers damagedFile.

Parameters
damagedFilefile to recover
protLevelprotection level
oldProtLevel
miniSaveFile
Returns
resulting error code
virtual void IDataBase::RegisterRootObject (IPMUnknownroot)
pure virtual

Internal use only.

virtual DBResultCode IDataBase::Revert ()
pure virtual

Reverts the database to the last saved state. This is only allowed when there are no outstanding references to anything in the database.

Returns
resulting error code
virtual DBResultCode IDataBase::Save ()
pure virtual

Saves changes to the file. You should not save a database on which there is an outstanding transaction, which is why save commands typically do not target the actual database being saved.

Returns
resulting error code
virtual DBResultCode IDataBase::SaveAs (const IDFiledestFile,
SaveFlags saveFlag = kSaveAs 
)
pure virtual

Saves the database to a new file. You should not save a database on which there is an outstanding transaction, which is why save commands typically do not target the actual database being saved.

Parameters
destFilefile to save to
saveFlagsaveAs or saveACopy
virtual void IDataBase::SetCachePolicy (CachePolicy policy)
pure virtual

Internal use only.

virtual void IDataBase::SetContiguousUIDChangeMarker (UID id,
bool16 changed 
)
pure virtual

Internal use only.

virtual void IDataBase::SetDBChangesMonitor (IDBChangesMonitor * dbChangesMonitor,
UndoSupport undoSupport 
)
pure virtual

Internal use only.

virtual void IDataBase::SetError (DBResultCode dbErrCode,
const IDFileuserProvidedFile = nullptr 
)
pure virtual

Internal use only.

virtual void IDataBase::SetFauxUserFile (const IDFilenewFile)
pure virtual

Internal use only.

virtual uint32 IDataBase::SetMiniSaveInterval (uint32 msecs)
pure virtual

Sets the interval (in milliseconds) in which the database should perform it's mini-save Returns the new interval (which might be different from msecs since there are certain limits)

Parameters
msecsnew interval in milliseconds
Returns
uint32 the previous interval
virtual void IDataBase::SetModified (bool16 modified)
pure virtual

Sets the database to a "modified" state – regardless whether db has been modified or not.

Parameters
modified
virtual void IDataBase::SetPlatformFileInfo (void * fileInfo)
pure virtual

This is used to set the Macintosh file creator and file type. On the Macintosh, this is expected to be a pointer to a file creator, followed by a file type (both OSType).

Parameters
fileInfocreator & type
virtual DBProgressFunction IDataBase::SetProgressCallback (DBProgressFunction callback)
pure virtual

Sets the progress callback function of the database and returns the previous one.

Parameters
callback
virtual DBResultCode IDataBase::UndeleteUID (UID id,
ClassID clsID 
)
pure virtual

Restores the previously deleted object with the given UID and ClassID. You will want to use exactly the same ClassID that was used to create the object. This is often called by Commands during an Undo operation.

Parameters
UIDof the object to restore
ClassIDfor the restored object
Returns
DBResultCode the resulting error code