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

#include <IXMLImportMatchMaker.h>

Inheritance diagram for IXMLImportMatchMaker:
IPMUnknownCPMUnknown< IXMLImportMatchMaker >CXMLImportMatchMaker

Public Types

enum  { kDefaultIID = IID_IXMLIMPORTMATCHMAKER }
 

Public Member Functions

virtual void Register (IPMUnknown *xmlImporter)=0
 
virtual ErrorCode MatchDocument (const IDXMLDOMGraph &leftGraph, IXMLImportMatchRecorder *matchRecorder)=0
 
virtual ErrorCode PostMatchDocument (const IDXMLDOMGraph &leftGraph, IXMLImportMatchRecorder *matchRecorder)=0
 
virtual ErrorCode Match (const IDXMLDOMGraph &leftGraph, const IDXMLDOMStructureOnlyIterator &leftIter, const IDXMLDOMStructureOnlyIterator &leftIterEnd, const XMLReferenceGraph &rightGraph, const XMLOutEdgeIterator &rightIter, const XMLOutEdgeIterator &rightIterEnd, IXMLImportMatchRecorder *matchRecorder)=0
 
virtual ErrorCode PostMatch (const IDXMLDOMGraph &leftGraph, const IDXMLDOMStructureOnlyIterator &leftIter, const IDXMLDOMStructureOnlyIterator &leftIterEnd, const XMLReferenceGraph &rightGraph, const XMLOutEdgeIterator &rightIter, const XMLOutEdgeIterator &rightIterEnd, IXMLImportMatchRecorder *matchRecorder)=0
 
virtual ErrorCode NoMatchMade (const IDXMLDOMGraph &leftGraph, const IDXMLDOMStructureOnlyIterator &leftIter, const IDXMLDOMStructureOnlyIterator &leftIterEnd, const XMLReferenceGraph &rightGraph, const XMLOutEdgeIterator &rightIter, const XMLOutEdgeIterator &rightIterEnd, IXMLImportMatchRecorder *matchRecorder)=0
 
virtual ErrorCode MatchPhaseComplete (const IDXMLDOMGraph &leftGraph, const XMLReferenceGraph &rightGraph, IXMLImportMatchRecorder *matchRecorder)=0
 
virtual ErrorCode NoMatchMadeOnRoot (const IDXMLDOMGraph &leftGraph, const IDXMLDOMStructureOnlyIterator &leftIter, const IDXMLDOMStructureOnlyIterator &leftIterEnd, const XMLReference &importIntoXMLRef, XMLReference &elementToMatch)=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

class for providing XML import match making service (kXMLImportMatchMakerSignalService)

Member Function Documentation

virtual ErrorCode IXMLImportMatchMaker::Match (const IDXMLDOMGraphleftGraph,
const IDXMLDOMStructureOnlyIteratorleftIter,
const IDXMLDOMStructureOnlyIteratorleftIterEnd,
const XMLReferenceGraphrightGraph,
const XMLOutEdgeIterator & rightIter,
const XMLOutEdgeIterator & rightIterEnd,
IXMLImportMatchRecordermatchRecorder 
)
pure virtual
called for kXMLImportMatchMakerSignalService to perform a match service

Parameters
leftGraphgraph of incoming XML
leftIterleft tree iterator
leftIterEndleft tree end iterator
rightGraphgraph of existing XML
rightIterright tree iterator
rightIterEndright tree end iterator
matchRecorderMatchRecorder. If the service decides to make a match, it must make appropriate calls in this functor class. Do not call the match recording method of this data if the service decides to not handle the match.
See Also
XMLImportMatchRecorder
Returns
ErrorCode

Implemented in CXMLImportMatchMaker.

virtual ErrorCode IXMLImportMatchMaker::MatchDocument (const IDXMLDOMGraphleftGraph,
IXMLImportMatchRecordermatchRecorder 
)
pure virtual
this is the first match call. It asks the match maker to match the incoming XML's 

document node to a XMLReference in the existing document. Use the match recorder to indicate whether the match was handled

Parameters
leftGraphgraph of incoming XML
matchRecorderMatchRecorder. If the service decides to make a match, it must make appropriate calls in this functor class. Do not call the match recording method of this data if the service decides to not handle the match.
See Also
XMLImportMatchRecorder
Returns
ErrorCode

Implemented in CXMLImportMatchMaker.

virtual ErrorCode IXMLImportMatchMaker::MatchPhaseComplete (const IDXMLDOMGraphleftGraph,
const XMLReferenceGraphrightGraph,
IXMLImportMatchRecordermatchRecorder 
)
pure virtual
called at the end of the entire match making phase

Parameters
leftGraphgraph of incoming XML
leftIterleft tree iterator
leftIterEndleft tree end iterator
rightGraphgraph of existing XML
rightIterright tree iterator
rightIterEndright tree end iterator
Returns
ErrorCode

Implemented in CXMLImportMatchMaker.

virtual ErrorCode IXMLImportMatchMaker::NoMatchMade (const IDXMLDOMGraphleftGraph,
const IDXMLDOMStructureOnlyIteratorleftIter,
const IDXMLDOMStructureOnlyIteratorleftIterEnd,
const XMLReferenceGraphrightGraph,
const XMLOutEdgeIterator & rightIter,
const XMLOutEdgeIterator & rightIterEnd,
IXMLImportMatchRecordermatchRecorder 
)
pure virtual
called by the default match maker. This is called after all match makers have been 

called, including the default match maker, and none of the services made a match. The default match maker is about to insert a new element and make a match to it. The match maker service being called is allow to make a last attempt at making a match. If still no match is made, then the default match maker will insert a new element

Parameters
leftGraphgraph of incoming XML
leftIterleft tree iterator
leftIterEndleft tree end iterator
rightGraphgraph of existing XML
rightIterright tree iterator
rightIterEndright tree end iterator
Returns
ErrorCode

Implemented in CXMLImportMatchMaker.

virtual ErrorCode IXMLImportMatchMaker::NoMatchMadeOnRoot (const IDXMLDOMGraphleftGraph,
const IDXMLDOMStructureOnlyIteratorleftIter,
const IDXMLDOMStructureOnlyIteratorleftIterEnd,
const XMLReferenceimportIntoXMLRef,
XMLReferenceelementToMatch 
)
pure virtual
called by the default match maker. This is called after all match makers have been 

called, including the default match maker, and none of the services made a match on the incoming root node. The default match maker is about to insert a new element and make a match to it. The match maker service being called is allowed to make a last attempt at making a match. If still no match is made, then the default match maker will insert a new element

Parameters
leftGraphgraph of incoming XML
leftIterleft tree iterator
leftIterEndleft tree end iterator
importIntoXMLRefthe element to import into
elementToMatchreturns the created element that the incoming root element should match to
Returns
ErrorCode

Implemented in CXMLImportMatchMaker.

virtual ErrorCode IXMLImportMatchMaker::PostMatch (const IDXMLDOMGraphleftGraph,
const IDXMLDOMStructureOnlyIteratorleftIter,
const IDXMLDOMStructureOnlyIteratorleftIterEnd,
const XMLReferenceGraphrightGraph,
const XMLOutEdgeIterator & rightIter,
const XMLOutEdgeIterator & rightIterEnd,
IXMLImportMatchRecordermatchRecorder 
)
pure virtual
called as part of kXMLImportMatchMakerSignalService after a match as been performed

Parameters
leftGraphgraph of incoming XML
leftIterleft tree iterator
leftIterEndleft tree end iterator
rightGraphgraph of existing XML
rightIterright tree iterator
rightIterEndright tree end iterator
Returns
ErrorCode

Implemented in CXMLImportMatchMaker.

virtual ErrorCode IXMLImportMatchMaker::PostMatchDocument (const IDXMLDOMGraphleftGraph,
IXMLImportMatchRecordermatchRecorder 
)
pure virtual
this is called after MatchDocument(). It is a notification for document element match

Parameters
leftGraphgraph of incoming XML
matchRecorderMatchRecorder. If the service decides to make a match, it must make appropriate calls in this functor class. Do not call the match recording method of this data if the service decides to not handle the match.
See Also
XMLImportMatchRecorder
Returns
ErrorCode

Implemented in CXMLImportMatchMaker.

virtual void IXMLImportMatchMaker::Register (IPMUnknownxmlImporter)
pure virtual
this method is called by the XMLImporter before the service is used (i.e. before the 

first of a series of Match() calls). This is where data about the XMLImporter handling the import is passed to the service providers

Parameters
xmlImporterXMLImporter handling the import. It may contain additional data about the import

Implemented in CXMLImportMatchMaker.