InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PstLstDataPersist Class Reference
Inheritance diagram for PstLstDataPersist:
CPMUnknown< IPstLstData >IPstLstDataIPMUnknown

Public Member Functions

 PstLstDataPersist (IPMUnknown *boss)
 
virtual const WideStringGetName ()
 
virtual void SetName (const WideString &theData)
 
virtual void SetParent (const UID parent)
 
virtual UID GetParent () const
 
void ReadWrite (IPMStream *stream, ImplementationID implementation)
 
- Public Member Functions inherited from CPMUnknown< IPstLstData >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 

Additional Inherited Members

- Public Types inherited from IPstLstData
enum  { kDefaultIID = IID_IPSTLSTDATA }
 
- Protected Member Functions inherited from CPMUnknown< IPstLstData >
 CPMUnknown (IPMUnknown *boss)
 
- Protected Attributes inherited from CPMUnknown< IPstLstData >
HelperInterface fHelperInterface
 

Detailed Description

PstLstDataPersist is the persistent IPstLstData implementation.

Constructor & Destructor Documentation

PstLstDataPersist::PstLstDataPersist (IPMUnknownboss)

Constructor.

Parameters
bossinterface ptr from boss object on which this interface is aggregated.

Member Function Documentation

const WideString & PstLstDataPersist::GetName (void )
virtual

This function returns its only data member, fName.

Returns
WideString the data member this interface carries.

Implements IPstLstData.

UID PstLstDataPersist::GetParent () const
virtual
void PstLstDataPersist::ReadWrite (IPMStreamstream,
ImplementationID implementation 
)

Because this is a persistent interface, it must support the ReadWrite method. This method is used for both writing information out to the database and reading information in from the database.

Note: the first thing we read/write here is a version number. It is used to identify which plug-in is used to write out this IPstLstData. Since this is the first version of the PstLst plug-in, thus the version number is 1, and then followed by the IPstLstData. Later if there is a newer version of this plug-in which will write out an extra field of data, then we can just come to this routine, and check the version number of the doc, and then read in the data accordingly. this will make sure the newer plug-in is backward compatible with an older version of document. Lastly, since the version number should be the first thing to read in for this interface, all the new data should be append at the bottom.

Parameters
streamcontains the stream to be written or read.
implementationthe implementation ID.
void PstLstDataPersist::SetName (const WideStringtheData)
virtual

This function set its only data member with the parameter passed in.

Parameters
theDatadata to be set

Implements IPstLstData.

void PstLstDataPersist::SetParent (const UID parent)
virtual