|
| static IDataBase * | CreateDataBase (IDataBase::UndoSupport undoSupport, bool hasContentMgr=true) |
| |
| static IDataBase * | CreateCloudDataBase (IDataBase::UndoSupport undoSupport, bool hasContentMgr=true, const std::string &assetRef="") |
| |
| static IDataBase * | CreateCloneFromDatabaseSnapshot (DatabaseSnapshotPtr dbSnapshot, IDataBase::UndoSupport undosupport=IDataBase::kPartialUndoSupport) |
| |
| static void | SetMagicBytes (const MagicBytes bytes) |
| |
| static uint32 | GetAvailableNewDatabases () |
| |
| static bool16 | IsValidDataBase (IDataBase *db) |
| |
| static bool16 | AttachInvalHandler (IDataBase *db, IInvalHandler *, InvalHandlerID id) |
| |
| static void | DetachInvalHandler (IDataBase *db, IInvalHandler *) |
| |
| static IInvalHandler * | GetInvalHandler (const IDataBase *db, InvalHandlerID id) |
| |
| static bool16 | StartCollectingInvals (IDataBase *db, IInvalHandler *handler) |
| |
| static void | DiscardLazyNotificationSubject (IDataBase *db, const UIDRef &subject) |
| |
| static void | SetCUIDImportFilter (CUIDFilterFunction functor) |
| |
| static void | SetCUIDExportFilter (CUIDFilterFunction functor) |
| |
| static CUIDFilterFunction | GetCUIDImportFilter () |
| |
| static CUIDFilterFunction | GetCUIDExportFilter () |
| |
| static BossConstructor | SetObjectConstructor (BossConstructor newConstructor) |
| |
| static void | GetUIDPersistedInterfaces (IDataBase *db, UID id, ClassID clsID, IPMPersist *obj, std::vector< ImplementationID > &implList) |
| |
| static void | SetBuildVersion (int32 majorVersionNumber, int32 minorVersionNumber) |
| |
| static bool16 | IsValidDataBase (const IDFile *fileToCheck) |
| |
| static void | SetRecoveryPath (const IDFile *newPath) |
| |
| static const IDFile * | GetRecoveryPath () |
| |
| static bool16 | EnableInstanceCaches (bool16 enable) |
| |
| static void | AddClass (IDataBase *db, ClassID newCls, UID uid) |
| |
| static void | ProcessDeferredContent (IDataBase *db) |
| |
| static IDataBase::CachePolicy | GetNewDataBaseCachePolicy () |
| |
| static void | SetNewDataBaseCachePolicy (IDataBase::CachePolicy) |
| |
| static IRIDXDBInterface * | GetRIDXDBInterface () |
| |
| static void | SetRIDXDBInterface (IRIDXDBInterface *i) |
| |
| static void | EnableRIDXDBInterface () |
| |
| static void | ShutdownSUIDS () |
| |
| static void | PreShutdownSUIDS () |
| |
| static void | InitializeSUIDS () |
| |
| static uint32 | GetTotalCurrentNetworkCacheSize () |
| |
Contains static utility functions related to databases.
- See Also
- IDataBase
| static void DBUtils::SetMagicBytes | ( | const MagicBytes | bytes | ) | |
| static |
Sets the magic bytes for the next database to be created. Each database created has a unique
identifier of kMagicByteCount bytes that identifies its type. Before creating a new database,
you should set the magic bytes to the identifier for your database type, and then afterwards
(regrettably) you need to remember to set it back to the default, which is "DOCUMENT" for .indd
files in InDesign. For example:
static DBUtils::MagicBytes resetBytes = { 'D', 'O', 'C', 'U', 'M', 'E', 'N', 'T' };
static DBUtils::MagicBytes myDatabaseBytes = { ... whatever your database type uses ... };
DBUtils::SetMagicBytes(myDatabaseBytes);
IDataBase *myDB = DBUtils::CreateDataBase();
DBUtils::SetMagicBytes(resetBytes);
if (myDB) ...
- Parameters
| bytes | The magic bytes to set for newly constructed databases. |
When an inval handler is attached to a database it can be in one of two states:
"collecting invals" or "not collection invals". Its intial state is "not collecting invals". When in "not collecting invals", if a change to the topic of interest takes place, in order to switch to "collecting invals", the inval handler must call DBUtils::StartCollectingInvals. This call returns kTrue if there is an ongoing undoable transaction in the database and kFalse otherwise (e.g. we are in the middle of undoing). If this call returns kTrue, the inval handler switches to "collecting invals" otherwise it remains in "not collection invals".
- Parameters
- Returns
- kTrue if there is an ongoing undoable transaction in the database, kFalse otherwise (for example, the application is in the middle of undoing a transaction)