InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXMLImportMatchRecorder.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Will Lin
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IXMLImportMatchRecorder__
25 #define __IXMLImportMatchRecorder__
26 
27 
28 #include "KeyValuePair.h"
29 #include "XMLID.h"
30 #include "XMLReference.h"
31 
32 
33 class IIDXMLDOMNode;
34 
37  public:
38  enum { kDefaultIID = IID_IXMLIMPORTMATCHRECORDER };
39 
45 
62  virtual void RecordMatch(IIDXMLDOMNode *leftNode, const XMLReference& rightNode, bool16 rightNodeIsNew, bool16 recordAsLastMatch = kTrue) = 0;
63 
67  virtual bool16 MatchMade(void) const = 0;
68 
72  virtual MatchRecord GetLastMatch(void) const = 0;
73 
82  virtual bool16 FindMatch(IIDXMLDOMNode *leftNode, XMLReference *rightNode = nil, bool16 *rightNodeIsNew = nil) const = 0;
83 
84  /* the following are for internal use only */
85 
97  virtual bool16 FindMatchRight(const XMLReference& rightNode, IIDXMLDOMNode **leftNode = nil, bool16 *rightNodeIsNew = nil) const = 0;
98 
111  virtual void ReplaceRightNode(const XMLReference& oldRightNode, const XMLReference& newRightNode, bool16 rightNodeIsNew) = 0;
112 
118  virtual void PushMatchMade(bool16 matchMade = kFalse) = 0;
119 
122  virtual bool16 PopMatchMade(void) = 0;
123 
128  virtual void PushLevel(void) = 0;
129 
134  virtual void PopLevel(void) = 0;
135 };
136 
137 const IXMLImportMatchRecorder::MatchRecord kInvalidMatchRecord;
138 
139 
140 #endif //__IXMLImportMatchRecorder__
141