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

#include <IPMPersist.h>

Inheritance diagram for IPMPersist:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPMPERSIST }
 

Public Member Functions

virtual UID GetUID () const =0
 
virtual IDataBaseGetDataBase () const =0
 
virtual void LoadAll (IPMStream *s, bool16 setDirty, int32 length=0)=0
 
virtual void SaveAll (IPMStream *s, bool16 clearDirty)=0
 
virtual void SetDirty (IPMUnknown *p, ImplementationID prop, bool16 allowModification=kTrue)=0
 
virtual void SetDirtyAllowDuplicateMessage (IPMUnknown *p, ImplementationID prop, bool16 allowModification=kTrue)=0
 
virtual void SetDirtyOverrideMessage (IPMUnknown *p, PMIID overrideIID, ImplementationID prop, bool16 allowModification=kTrue)=0
 
virtual void SetDirtyOverrideAllowDuplicateMessage (IPMUnknown *p, PMIID overrideIID, ImplementationID prop, bool16 allowModification=kTrue)=0
 
For internal use only
virtual void Init (IDataBase *db, UID id)=0
 
virtual IContentReadIteratorNewReadIterator (IPMStream *s)=0
 
virtual IContentWriteIteratorNewWriteIterator (IPMStream *s)=0
 
virtual void LoadOne (IPMStream *s, ImplementationID prop, IPMUnknown *loadThis, bool16 setDirty)=0
 
virtual void SaveDirty (IPMStream *s, bool16 clearDirty=kTrue)=0
 
virtual void SaveSingleInterface (InterfaceReadWrite readWriter, IPMUnknown *face, IPMStream *s, ImplementationID tag, IContentTracker *contentTracker)=0
 
virtual bool16 IsDirty (const IPMUnknown *p) const =0
 
virtual void ClearDirty ()=0
 
virtual void ResetOneToSnapshot (ImplementationID prop, SnapshotID snapshotID, ISnapshotCache *snapshotCache)=0
 
virtual SnapshotID SnapshotDirty (ImplementationID prop)=0
 
virtual void SnapshotDirty ()=0
 
virtual void RefreshCachedLastRevInfoAfterDBClone (bool objIsReferenced)=0
 
virtual void UpdateReadStamps ()=0
 
virtual void MarkDirtyInterfacesToBeCopiedAtNextMiniSave ()=0
 
virtual void SaveThisToComposite (IDataBase *source, IDataBase *target, UID thisUID)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Manages the persistence aspect of an object: handles streaming the boss object, stores the UID and database (IDataBase).

Member Function Documentation

virtual IDataBase* IPMPersist::GetDataBase () const
pure virtual
Return a pointer to the object's open database.

Returns
The object's database. Usually called via PersistUtils::GetDataBase().
virtual UID IPMPersist::GetUID () const
pure virtual
Returns the unique ID used to specify the object to the

database. This can be used in a call to IDataBase::Instantiate().

Usually this is called via PersistUtils::GetUID().

Returns
The object's UID.
virtual void IPMPersist::LoadAll (IPMStreams,
bool16 setDirty,
int32 length = 0 
)
pure virtual

Reset the object state using the contents of the stream. Streams in every persistent interface. After the object is streamed in, it sets the dirty flag if setDirty is kTrue. When loading objects from the database, setDirty should be false. In all other cases, setDirty should be kTrue.

Parameters
sThe stream we're reading from
setDirtykTrue if object should be marked dirty after loading
lengthLength of the object in the stream, in number of bytes
virtual void IPMPersist::SaveAll (IPMStreams,
bool16 clearDirty 
)
pure virtual

Stream out all persistent interfaces of the object into the stream (s). After the object is streamed out, the dirty flag is cleared if clearDirty is kTrue. When streaming objects out to the database, clearDirty should be kTrue. In all other cases, clearDirty should be false.

Parameters
sThe stream to write to
clearDirtykTrue if dirty flag should be cleared after write
virtual void IPMPersist::SaveDirty (IPMStreams,
bool16 clearDirty = kTrue 
)
pure virtual

Internal Use Only. Stream out the persistent interfaces of the object that are dirty, combining them with the saved object state in the database.

Parameters
sThe stream to write to
clearDirtykTrue if dirty flag should be cleared after write
virtual void IPMPersist::SetDirty (IPMUnknownp,
ImplementationID prop,
bool16 allowModification = kTrue 
)
pure virtual

Mark an interface of the object as dirty. Should not be called directly – usually called by calling Dirty() on the interface, or calling PersistUtils::Dirty().

Parameters
pThe dirty interface
propImplementationID of the dirty interface
allowModificationkTrue if the database should be marked as dirty, false if it's an "optional dirty" which should be written out only if the database is dirtied.