InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CDatabaseObserver Class Reference

#include <CDatabaseObserver.h>

Inheritance diagram for CDatabaseObserver:
IDatabaseObserverIPMUnknown

Public Member Functions

virtual void SetDirty (IDataBase *db, UID id, ClassID clsID, ImplementationID tag, const bool16 dbModified)
 
virtual void NewUID (IDataBase *db, UID id, ClassID clsID)
 
virtual void DeleteUID (IDataBase *db, UID id, ClassID clsID)
 
virtual void UndeleteUID (IDataBase *db, UID id, ClassID clsID)
 
virtual void DestroyDeletedUID (IDataBase *db, UID id)
 
virtual void BeginTransaction (IDataBase *db)
 
virtual void EndTransaction (IDataBase *db)
 
virtual void SetModified (IDataBase *db, bool16 modified)
 
virtual void AttachedTo (IDataBase *db)
 
- Public Member Functions inherited from IDatabaseObserver
virtual uint32 GetEventClassesToObserve ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Additional Inherited Members

- Public Types inherited from IDatabaseObserver
enum  Observable {
  kWatchDirties = 1, kWatchUIDCreationDestruction = 2, kWatchTransactions = 4, kWatchModified = 8,
  kWatchAll = 0xffffffff
}
 

Detailed Description

To find out when certain database actions happen, implement an DatabaseObserver and attach it to the database. Database observers should inherit from CDatabaseObserver and not IDatabaseObserver. See IDatabaseObserver for full details.

See Also
IDataBaseObserver

Member Function Documentation

virtual void CDatabaseObserver::AttachedTo (IDataBasedb)
virtual

Called by the database when the observer is attached.

Parameters
dbthe database we're observing

Implements IDatabaseObserver.

virtual void CDatabaseObserver::BeginTransaction (IDataBasedb)
virtual

Called by the database when it gets an BeginTransaction.

Parameters
dbthe database we're observing

Implements IDatabaseObserver.

virtual void CDatabaseObserver::DeleteUID (IDataBasedb,
UID id,
ClassID clsID 
)
virtual

Called by the database when it gets a DeleteUID.

Parameters
dbthe database we're observing
idthe UID that was deleted
clsIDthe class of the deleted UID

Implements IDatabaseObserver.

virtual void CDatabaseObserver::DestroyDeletedUID (IDataBasedb,
UID id 
)
virtual

Called by the database when it gets an DestroyDeletedUID.

Parameters
dbthe database we're observing
idthe UID that was destroyed

Implements IDatabaseObserver.

virtual void CDatabaseObserver::EndTransaction (IDataBasedb)
virtual

Called by the database when it gets an EndTransaction.

Parameters
dbthe database we're observing

Implements IDatabaseObserver.

virtual void CDatabaseObserver::NewUID (IDataBasedb,
UID id,
ClassID clsID 
)
virtual

Called by the database when it gets a NewUID.

Parameters
dbthe database we're observing
idthe UID that was created
clsIDthe class of the new UID

Implements IDatabaseObserver.

virtual void CDatabaseObserver::SetDirty (IDataBasedb,
UID id,
ClassID clsID,
ImplementationID tag,
const bool16 dbModified 
)
virtual

Called by the database when it gets a DirtyObject.

Parameters
dbthe database we're observing
idthe UID that was dirtied
tagthe ImplementationID that was dirtied
dbModifiedkTrue if this dirty could have caused the database to be marked as modified

Implements IDatabaseObserver.

virtual void CDatabaseObserver::SetModified (IDataBasedb,
bool16 modified 
)
virtual

Called by the database when the logical modified state of the database changes.

Parameters
dbthe database we're observing
modifiedis whether the database mofified state is set (e.g. file is dirty from the user's standpoint)

Implements IDatabaseObserver.

virtual void CDatabaseObserver::UndeleteUID (IDataBasedb,
UID id,
ClassID clsID 
)
virtual

Called by the database when it gets an UndeleteUID.

Parameters
dbthe database we're observing
idthe UID that was restored
clsIDthe class of that the UID was restored to

Implements IDatabaseObserver.