InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CReferenceConverter Class Reference
Inheritance diagram for CReferenceConverter:
CPMUnknown< IReferenceConverter >IReferenceConverterIPMUnknownPstLstReferenceConverter

Public Member Functions

 CReferenceConverter (IPMUnknown *boss)
 
virtual bool16 CanConvert (ClassID)
 
virtual UID ConvertReference (IDataBase *, UID, IDataBase *, IPMUnknown *)
 
virtual bool16 ConvertAlways () const
 
virtual UID GetReference (IDataBase *, UID, IDataBase *) const
 
virtual bool16 IsMappingReference (IDataBase *, UID, IDataBase *) const
 
virtual UID MapReference (IDataBase *, UID, IDataBase *, IPMUnknown *)
 
virtual UID GetMappedReference (IDataBase *, UID, IDataBase *)
 
- Public Member Functions inherited from CPMUnknown< IReferenceConverter >
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
 

Additional Inherited Members

- Public Types inherited from IReferenceConverter
enum  { kDefaultIID = IID_IREFERENCECONVERTER }
 
- Protected Member Functions inherited from CPMUnknown< IReferenceConverter >
 CPMUnknown (IPMUnknown *boss)
 
- Protected Attributes inherited from CPMUnknown< IReferenceConverter >
HelperInterface fHelperInterface
 

Member Function Documentation

virtual bool16 CReferenceConverter::CanConvert (ClassID clsID)
inlinevirtual

Return kTrue if the converter is capable of converting objects of the class clsID.

Parameters
clsIDthe class of the object being copied
Returns
kTrue if this reference converters handles the object type

Implements IReferenceConverter.

Reimplemented in PstLstReferenceConverter.

virtual bool16 CReferenceConverter::ConvertAlways () const
inlinevirtual

Return kTrue if the converter should be called to convert every time. The default return value should be kFalse to allow K2 recognize that an item has already been converted and that when it encounters other references to the same item, it can simply use the result of the previous conversion.

Implements IReferenceConverter.

Reimplemented in PstLstReferenceConverter.

virtual UID CReferenceConverter::ConvertReference (IDataBasesourceDB,
UID convertThis,
IDataBasetargetDB,
IPMUnknownpmobject 
)
inlinevirtual

Convert the UID from a reference to a uid in the source database, to a reference to a UID in the target database. This may cause changes to the target database.

Parameters
sourceDBthe database we're copying from
convertThisthe object we're copying
targetDBthe database we're copying to
pmobjecta helper object (whatever pmobject was passed into ScrapUtils::CopyObjects or whatever other calling code set up the stream)
Returns
the UID of the matching object in the target database

Implements IReferenceConverter.

Reimplemented in PstLstReferenceConverter.

virtual UID CReferenceConverter::GetMappedReference (IDataBasesourceDB,
UID convertThis,
IDataBasetargetDB 
)
inlinevirtual

Like MapReference() it maps the UID from sourceDB to targetDB but it doesn't create a new UID in the targetDB if it couldn't convert it. Instead it returns kInvalidUID.

Implements IReferenceConverter.

virtual UID CReferenceConverter::GetReference (IDataBasesourceDB,
UID convertThis,
IDataBasetargetDB 
) const
inlinevirtual

Like ConvertReference() it converts the UID from sourceDB to targetDB but it doesn't create a new UID in the targetDB if it couldn't convert it. Instead it returns kInvalidUID. This method is used i.e. by Find/Change of UID based text attributes (language, font, color).

Implements IReferenceConverter.

Reimplemented in PstLstReferenceConverter.

virtual bool16 CReferenceConverter::IsMappingReference (IDataBasesourceDB,
UID convertThis,
IDataBasetargetDB 
) const
inlinevirtual

Returns kTrue if reference conversion is being done for the purpose of mapping references (e.g. style mapping). The default return value for most reference converter should be kFalse. Only converters which will be doing mapping of reference for the passed "convertThis" UID, should return kTrue

Parameters
sourceDBthe database we're copying from
convertThisthe object whose reference we intend to convert
targetDBthe database we're copying to.
Returns
kTrue if we are mapping the object from source to target DB.

Implements IReferenceConverter.

virtual UID CReferenceConverter::MapReference (IDataBasesourceDB,
UID convertThis,
IDataBasetargetDB,
IPMUnknownpmobject 
)
inlinevirtual

Map the UID from a reference to a uid in the source database, to a reference to a UID in the target database. This may cause changes to the target database.

Parameters
sourceDBthe database we're copying from
convertThisthe object we're mapping
targetDBthe database we're copying to
pmobjecta helper object (whatever pmobject was passed into ScrapUtils::CopyObjects or whatever other calling code set up the stream)
Returns
the UID of the mapped object in the target database

Implements IReferenceConverter.