![]() | InDesign SDK 20.5 |
#include <IPMStream.h>

Public Types | |
| enum | _StreamType { kUnknown, kReader, kWriter } |
| typedef enum IPMStream::_StreamType | StreamType |
Public Member Functions | |
| template<typename T > | |
| void | XferEnum (T &e) |
| virtual uchar | XferByte (uchar &chr)=0 |
| virtual int32 | XferByte (uchar *buf, int32 num)=0 |
| virtual bool16 | XferBool (bool16 &chr)=0 |
| virtual int32 | XferBool (bool16 *buf, int32 num)=0 |
| virtual int16 | XferInt16 (int16 &i)=0 |
| virtual int32 | XferInt16 (int16 *buf, int32 num)=0 |
| virtual int32 | XferInt32 (int32 &i)=0 |
| virtual int32 | XferInt32 (int32 *buf, int32 num)=0 |
| virtual int64 | XferInt64 (int64 &i)=0 |
| virtual uintptr_t | XferPointer (uintptr_t &i)=0 |
| template<class T > | |
| IDType< T > | XferID (IDType< T > &id) |
| template<class T > | |
| int32 | XferID (IDType< T > *buf, int32 count) |
| virtual ClassID | XferID (ClassID &i)=0 |
| virtual int32 | XferID (ClassID *buf, int32 num)=0 |
| virtual ImplementationID | XferID (ImplementationID &i)=0 |
| virtual int32 | XferID (ImplementationID *buf, int32 num)=0 |
| virtual WidgetID | XferID (WidgetID &i)=0 |
| virtual int32 | XferID (WidgetID *buf, int32 num)=0 |
| virtual PluginID | XferID (PluginID &i)=0 |
| virtual int32 | XferID (PluginID *buf, int32 num)=0 |
| virtual PMIID | XferID (PMIID &i)=0 |
| virtual int32 | XferID (PMIID *buf, int32 num)=0 |
| virtual ActionID | XferID (ActionID &i)=0 |
| virtual int32 | XferID (ActionID *buf, int32 num)=0 |
| virtual ScriptElementID | XferID (ScriptElementID &i)=0 |
| virtual int32 | XferID (ScriptElementID *buf, int32 num)=0 |
| virtual ScriptID | XferID (ScriptID &i)=0 |
| virtual int32 | XferID (ScriptID *buf, int32 num)=0 |
| virtual LinkClientID | XferID (LinkClientID &i)=0 |
| virtual int32 | XferID (LinkClientID *buf, int32 num)=0 |
| virtual UID | XferObject (UID &u)=0 |
| virtual int32 | XferObject (UID *buf, int32 num)=0 |
| virtual UID | XferReference (UID &u)=0 |
| virtual int32 | XferReference (UID *buf, int32 num)=0 |
| virtual PMReal & | XferRealNumber (PMReal &r)=0 |
| virtual int32 | XferRealNumber (PMReal *buf, int32 num)=0 |
| virtual void | Comment (const char *comment)=0 |
| virtual int64 | Seek (int64 numberOfBytes, SeekFromWhere fromHere)=0 |
| virtual void | SetEndOfStream ()=0 |
| virtual void | Flush ()=0 |
| virtual StreamState | GetStreamState ()=0 |
| virtual bool16 | IsReading () const =0 |
| virtual bool16 | IsWriting () const =0 |
| virtual bool16 | IsWritingForDuplication (IDataBase **optDestDB=nil) const =0 |
| virtual void | SetSwapping (bool16 swapOn)=0 |
| virtual bool16 | GetSwapping () const =0 |
| virtual bool16 | Open ()=0 |
| virtual void | Close ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
IPMStream is the interface for streaming. It is used for serializing objects to/from the disk, copying objects, reading objects in from files, resources, or memory, etc. Each of the Xfer functions will either Read or Write the data, depending on the stream type. Xfer functions that take two arguments, where the second is a count, read or write an array of data.
| typedef enum IPMStream::_StreamType IPMStream::StreamType |
StreamType
| pure virtual |
Close the stream. Call this when you are all done with the stream.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
This method is mainly for notation purposes. Streams that write data in a text format write out appropriate syntax for the beginning and ending of structs and arrays.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Flushes any pending writes out to the operating system.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Return the current stream state. Use this method to tell whether you've read past the end of the stream.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Returns true if the stream is a read (input) stream.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Returns true if the stream is a write (output) stream.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Write streams which are created for the purposes of duplicating, such as from IScrapUtils::CopyObject(), may influence how persisting implemenations behave if they have state that is dependent on external state. The value returned here is by definition constant throughout the life of the stream. Most implementors of IPMStreams will always return kFalse and only those which duplicate objects, rathern than simply persisting them, in XferReference() and XferObject() should be returning kTrue.
| optDestDB | Pointer to IDataBase pointer. If non-nil, will be filled in with the destination if the method returns kTrue, otherwise unchanged. |
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Open the stream for reading or writing. This must be called before any Xfers are called. It gets called for you by the StreamUtils functions. Typically streams may have data interfaces that must be filled out before you can call Open.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Set the location for the next xfer. Analogous to seeking in a file.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Set the end of the stream at the current location. Truncates the stream!
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Turn byte swapping on/off. When on, the stream will treat the data target as having the oppsite byte order to the current platform. The stream will automatically byte swap if swapping has been turned on, enabling conversion across platforms. Swapping is off by default.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write a single bool16.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of bools.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write a single byte.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of bytes.
Implemented in CStreamRead, and CStreamWrite.
| inline |
Read or write a single enum value.
| inline |
Read or write a single ClassID.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of ClassIDs.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write a single ImplementationID. idSpace is implied to be kImplementationIDSpace
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of ImplementationIDs.
Implemented in CStreamRead, and CStreamWrite.
Read or write a single WidgetID. idSpace is implied to be kWidgetIDSpace
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of WidgetIDs.
Implemented in CStreamRead, and CStreamWrite.
Read or write a single PluginID. idSpace is implied to be kPluginIDSpace
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of PluginIDs.
Implemented in CStreamRead, and CStreamWrite.
Read or write a single PMIID. idSpace is implied to be kInterfaceIDSpace
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of PMIIDs.
Implemented in CStreamRead, and CStreamWrite.
Read or write a single Action id. idSpace is implied to be kActionIDSpace
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of ActionIDs.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write a single ScriptInfo id. idSpace is implied to be kScriptInfoIDSpace
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of ScriptElementIDs.
Implemented in CStreamRead, and CStreamWrite.
Read or write a single ScriptID id.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of ScriptIDs.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write a single LinkClientID id. idSpace is implied to be kLinkClientIDSpace.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of LinkClientIDs.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write a single int16.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of int16.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write a single int32.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of int32.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write a single int64.
Implemented in CStreamRead, and CStreamWrite.
Read or write a single UID-based object. Call this method when an object is being written out, and the object has a UID to another object that it owns. The stream will decide whether to output just the UID, or to make a copy of the object. For instance, if an object has children, it should call XferObject to write out the children.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of objects.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write a single pointer - this will fail if writing to a user document, and return garbage when reading from a user document; useful only for memory streams. There is no validity checking on the pointer, it is up to the reader/writer to manage the pointers lifetime. On a 32 bit machine, this will xfer 4 bytes, on a 64 bit machine, it will xfer 8 bytes.
Implemented in CStreamRead, and CStreamWrite.
Read or write a single real number.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of real number.
Implemented in CStreamRead, and CStreamWrite.
Read or write a single object reference. Call this method when an object is being written out, and the object has a UID to another object but it just refers to the other object, it doesn't own it. For instance, if an object has a reference to some global object that is owned by the document (for instance a style or color), it uses XferReference to tell the stream to map the reference from a reference to a color in the source document, to an equivalent color in the destination document.
Implemented in CStreamRead, and CStreamWrite.
| pure virtual |
Read or write an array of object references.
Implemented in CStreamRead, and CStreamWrite.