![]() | InDesign SDK 20.5 |

Public Member Functions | |
| BPIDataPersist (IPMUnknown *boss) | |
| virtual const WideString & | Get () |
| virtual void | Set (const WideString &value) |
| void | ReadWrite (IPMStream *stream, ImplementationID implementation) |
Public Member Functions inherited from CPMUnknown< IBPIData > | |
| IPMUnknown * | QueryInterface (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 | |
| CPMUnknown & | operator= (const CPMUnknown &)=delete |
Additional Inherited Members | |
Public Types inherited from IBPIData | |
| enum | { kDefaultIID = IID_IBPIDATA } |
Protected Member Functions inherited from CPMUnknown< IBPIData > | |
| CPMUnknown (IPMUnknown *boss) | |
Protected Attributes inherited from CPMUnknown< IBPIData > | |
| HelperInterface | fHelperInterface |
Persistent implementation of IBPIData used by clients who need to store the value in documents and other kinds of databases.
| BPIDataPersist::BPIDataPersist | ( | IPMUnknown * | boss | ) |
Constructor.
| boss | interface ptr from boss object on which this interface is aggregated. |
| virtual |
| void BPIDataPersist::ReadWrite | ( | IPMStream * | stream, |
| 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 BPI data. Since this is the first version of the BPI plug-in, thus the version number is 1, and then followed by the BPI data. 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.
| stream | contains the stream to be written or read. |
| implementation | the implementation ID. |
| virtual |