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

#include <IXMLImportOptionsPool.h>

Inheritance diagram for IXMLImportOptionsPool:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IXMLIMPORTOPTIONSPOOL }
 
typedef WideString KeyType
 

Public Member Functions

virtual bool16 GetValue (const KeyType &key, bool16 &value) const =0
 
virtual bool16 GetValue (const KeyType &key, int32 &value) const =0
 
virtual bool16 GetValue (const KeyType &key, WideString &value) const =0
 
virtual bool16 SetKeyValue (const KeyType &key, bool16 value)=0
 
virtual bool16 SetKeyValue (const KeyType &key, int32 value)=0
 
virtual bool16 SetKeyValue (const KeyType &key, const WideString &value)=0
 
virtual bool16 RemoveKey (const KeyType &key)=0
 
virtual ErrorCode Set (const WideString &data)=0
 
virtual void Get (WideString &data) const =0
 
virtual void Clear (void)=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

Interface for packaging and retrieving data using key value pairs. Primarily used for storing XML import options.

To have this interface store data for you, set up your data such that you can identify it with a key value pair. Call SetKeyValue() to add data into this interface for storage. Use GetValue() to retrieve data using your key. Keys should be non-namespace XML names that uniquely identifies it.

The client is responsible for interpreting the data set and retrieved. This interface merely stores the information for you. If the plug-in is missing, the data will continue to be preserved until at a later time it is either deleted or cleared by a plug-in.

To store a snapshot of the data in the interface, call Get() to retrieve a data block that contains information stored within the interface. Later, call Set() to restore the data in the interface

Member Typedef Documentation

type to use for key specification

Member Function Documentation

virtual void IXMLImportOptionsPool::Clear (void )
pure virtual

Erase all data stored in this

virtual void IXMLImportOptionsPool::Get (WideStringdata) const
pure virtual

Take the data stored in this and package it as a data block

Parameters
[OUT]receives packaged data within this
virtual bool16 IXMLImportOptionsPool::GetValue (const KeyTypekey,
bool16 & value 
) const
pure virtual

Retrieve a bool value given a key

Parameters
keykey to look up a value with [OUT] receives retrieved value
Returns
bool16 kTrue if successful; kFalse if failed, either key not found or failed to convert data to specified type
virtual bool16 IXMLImportOptionsPool::GetValue (const KeyTypekey,
int32 & value 
) const
pure virtual

Retrieve a int32 value given a key

Parameters
keykey to look up a value with [OUT] receives retrieved value
Returns
bool16 kTrue if successful; kFalse if failed, either key not found or failed to convert data to specified type
virtual bool16 IXMLImportOptionsPool::GetValue (const KeyTypekey,
WideStringvalue 
) const
pure virtual

Retrieve a string value given a key

Parameters
keykey to look up a value with [OUT] receives retrieved value
Returns
bool16 kTrue if successful; kFalse if failed, because key not found
virtual bool16 IXMLImportOptionsPool::RemoveKey (const KeyTypekey)
pure virtual

Remove the entry with the given key

Parameters
keykey to look up
Returns
bool16 kTrue if key found; kFalse if key not found
virtual ErrorCode IXMLImportOptionsPool::Set (const WideStringdata)
pure virtual

Set the data used in this to the given data block. All previous data stored in this will be deleted. Data in the given data block will be extracted and stored in this

Parameters
dataextract new data from here
Returns
ErrorCode error code from extraction. If not kSuccess, old data will remain
virtual bool16 IXMLImportOptionsPool::SetKeyValue (const KeyTypekey,
bool16 value 
)
pure virtual

Set (if key already exists) or add (if key does not exist) the given key value pair

Parameters
keykey to use
valuevalue to bind with key
Returns
bool16 kTrue if key already exists; kFalse if key did not exist
virtual bool16 IXMLImportOptionsPool::SetKeyValue (const KeyTypekey,
int32 value 
)
pure virtual

Set (if key already exists) or add (if key does not exist) the given key value pair

Parameters
keykey to use
valuevalue to bind with key
Returns
bool16 kTrue if key already exists; kFalse if key did not exist
virtual bool16 IXMLImportOptionsPool::SetKeyValue (const KeyTypekey,
const WideStringvalue 
)
pure virtual

Set (if key already exists) or add (if key does not exist) the given key value pair

Parameters
keykey to use
valuevalue to bind with key
Returns
bool16 kTrue if key already exists; kFalse if key did not exist