InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CXMLImportPreferences Class Reference
Inheritance diagram for CXMLImportPreferences:
CPMUnknown< IXMLImportPreferences >IXMLImportPreferencesIPMUnknownXCatHndAcquirerXMLImportPrefsXDocBkCALSContentXMLImportPrefsXDocBkXPostImpXMLImportPrefsXDocBkXTransXMLImportPrefs

Public Member Functions

 CXMLImportPreferences (IPMUnknown *boss)
 
virtual void Initialize (IXMLImportOptionsPool *pool)
 
virtual void Uninitialize ()
 
virtual int32 GetPrefCount () const
 
virtual kPrefType GetNthPrefType (int32 n) const
 
virtual int32 GetNthPrefAsInt (int32 n) const
 
virtual bool16 GetNthPrefAsBool (int32 n) const
 
virtual WideString GetNthPrefAsString (int32 n) const
 
virtual void SetNthPref (int32 n, const int32 &newVal)
 
virtual void SetNthPref (int32 n, const bool16 &newVal)
 
virtual void SetNthPref (int32 n, const WideString &newVal)
 
virtual void CommitChanges ()
 
- Public Member Functions inherited from CPMUnknown< IXMLImportPreferences >
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
 

Protected Member Functions

void AddPreference (const WideString &name, IXMLImportPreferences::kPrefType type, int32 intVal=-1, bool16 boolVal=kFalse, const WideString &stringVal=WideString())
 
- Protected Member Functions inherited from CPMUnknown< IXMLImportPreferences >
 CPMUnknown (IPMUnknown *boss)
 

Protected Attributes

K2Vector< SinglePreffPrefs
 
InterfacePtr
< IXMLImportOptionsPool
fPool
 
- Protected Attributes inherited from CPMUnknown< IXMLImportPreferences >
HelperInterface fHelperInterface
 

Additional Inherited Members

- Public Types inherited from IXMLImportPreferences
enum  { kDefaultIID = IID_IXMLIMPORTPREFERENCES }
 
enum  kPrefType { kBool16, kInt32, kWideString }
 

Member Function Documentation

void CXMLImportPreferences::AddPreference (const WideStringname,
IXMLImportPreferences::kPrefType type,
int32 intVal = -1,
bool16 boolVal = kFalse,
const WideStringstringVal = WideString() 
)
protected
Use this to add a single preference easily. This method will check the 

preference pool for the stored value based on the name and the type. If no preference could be found it will use the default value passed in.

Parameters
name- the name of the new preference
type- The type of the new preference
intVal- The suggested integer value of the preference
boolVal- The suggested bool value of the preference
stringVal- The suggested string value of the preference
virtual void CXMLImportPreferences::CommitChanges ()
virtual

Commit the stored changes to the preferences. Until this method has been called the changes made by calling SetNthPref() don't really get moved into the preferences. Call this method after each of the changes for this set of preferences has been set appropriately

Implements IXMLImportPreferences.

virtual bool16 CXMLImportPreferences::GetNthPrefAsBool (int32 n) const
inlinevirtual

Get the value of the specified preference as a bool16

Parameters
n- The preference you want to know about
Returns
- The bool value this preference is currently set to

Implements IXMLImportPreferences.

virtual int32 CXMLImportPreferences::GetNthPrefAsInt (int32 n) const
inlinevirtual

Get the value of the specified preference as an int32

Parameters
n- The preference you want to know about
Returns
- The int32 this preference is currently set to

Implements IXMLImportPreferences.

virtual WideString CXMLImportPreferences::GetNthPrefAsString (int32 n) const
inlinevirtual

Get the value of the specified preference as a WideString

Parameters
n- The preference you want to know about
Returns
- The string this preference is currently set to

Implements IXMLImportPreferences.

virtual kPrefType CXMLImportPreferences::GetNthPrefType (int32 n) const
inlinevirtual

Indicates what type of data a specific preference uses as its value.

Parameters
n- The preference you want to gather info about.

Implements IXMLImportPreferences.

virtual int32 CXMLImportPreferences::GetPrefCount () const
inlinevirtual

Get the number of preference held by this object

Returns
- The number of preferences you can get/set

Implements IXMLImportPreferences.

virtual void CXMLImportPreferences::Initialize (IXMLImportOptionsPoolpool)
virtual

Initialize the stored data. This is the only method that will need to be overridden if you inherit from CXMLImportPreferences rather than this file.

Note: Because this class doesn't know when you are done with the data you need to call Uninitialize when you are done with it.

Use stack based helper class XMLImportPreferencesInitializer below to avoid missing calling Uninitialize.

Parameters
pool- The pool which owns the preferences
See Also
CXMLImportPreferences.h
Uninitional

Implements IXMLImportPreferences.

Reimplemented in XDocBkXTransXMLImportPrefs, XDocBkCALSContentXMLImportPrefs, XCatHndAcquirerXMLImportPrefs, and XDocBkXPostImpXMLImportPrefs.

virtual void CXMLImportPreferences::SetNthPref (int32 n,
const int32 & newVal 
)
inlinevirtual

Set the int32 value of a particular preference

Parameters
n- The preference you want changed
newVal- The new value you want the preference set to

Implements IXMLImportPreferences.

virtual void CXMLImportPreferences::SetNthPref (int32 n,
const bool16 & newVal 
)
inlinevirtual

Set the bool16 value of a particular preference

Parameters
n- The preference you want changed
newVal- The new value you want the preference set to

Implements IXMLImportPreferences.

virtual void CXMLImportPreferences::SetNthPref (int32 n,
const WideStringnewVal 
)
inlinevirtual

Set the string value of a particular preference

Parameters
n- The preference you want changed
newVal- The new value you want the preference set to

Implements IXMLImportPreferences.

virtual void CXMLImportPreferences::Uninitialize ()
virtual

Uninitialize the stored data. You need to override this method if you store your own data locally.

Implements IXMLImportPreferences.