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

#include <IBlackBoxData.h>

Inheritance diagram for IBlackBoxData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IBLACKBOXDATA }
 

Public Member Functions

virtual int32 GetDataLength (BlackBoxKey clsID)=0
 
virtual int32 ReadData (BlackBoxKey key, void *buffer, int32 amountToRead)=0
 
virtual void WriteData (BlackBoxKey key, void *buffer, int32 length)=0
 
virtual void RemoveData (BlackBoxKey key)=0
 
virtual BlackBoxKey GetNextKey (BlackBoxKey key) const =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

This is an interface to a container for generic data. Use this interface if you want to attach data to an InDesign document, but you want complete control and responsibility over how the data is managed.

Member Function Documentation

virtual int32 IBlackBoxData::GetDataLength (BlackBoxKey clsID)
pure virtual

Use this to find out if the black box already has data stored under your key.

Parameters
keythe key to check for
Returns
bool16 kTrue if black box does contain data, kFalse otherwise
virtual BlackBoxKey IBlackBoxData::GetNextKey (BlackBoxKey key) const
pure virtual

For internal use only

virtual int32 IBlackBoxData::ReadData (BlackBoxKey key,
void * buffer,
int32 amountToRead 
)
pure virtual

Read data out of the black box and into the buffer passed in by the client.

Parameters
keythe key used for storing the data originally
bufferto place the data in
amountToReadmaximum amount to read
Returns
int32 number of bytes read
virtual void IBlackBoxData::RemoveData (BlackBoxKey key)
pure virtual

Remove the data stored with the key from the buffer. If there is no data this does nothing.

Parameters
keyspecifies which piece of data to delete (
See Also
WriteData).
virtual void IBlackBoxData::WriteData (BlackBoxKey key,
void * buffer,
int32 length 
)
pure virtual

Write data out of the buffer, into the black box, using the supplied key. The key can be used later to read the data back in. If there is already data stored under that key, the old data is replaced by the new data. Therefore make sure you use a unique key that was created using a prefix that has been assigned to your exclusive use.

Parameters
keyto associate with the data
bufferthat contains the data
lengthnumber of bytes to write