5 #include <GdomeSmartDOM.hh>
7 #define XMLNS_NS_URI "http://www.w3.org/2000/xmlns/"
8 #define DDIFF_NS_URI "http://helm.cs.unibo.it/2002/DDIFF"
10 namespace GdomeSmartDOMExt
13 using namespace GdomeSmartDOM;
18 typedef bool (*flatNodeEq)(const Node&, const Node&);
19 static bool defaultFlatNodeEq(const Node&, const Node&);
22 Diff(const Node& n, const Document& d, flatNodeEq e) : dest(n), doc(d), eq(e) { };
25 static Diff diff(const Document&, const Document&, flatNodeEq = defaultFlatNodeEq);
26 static Diff diff(const Element&, const Element&, flatNodeEq = defaultFlatNodeEq);
28 Document document(void) const { return doc; };
29 Node node(void) const { return dest; };
31 void patch(void) const;
35 BADDiff(const std::string& s) : msg(s) { };
36 const std::string msg;
40 Node diffNodes(const Node&, const Node&) const;
41 bool diffChildren(const Node&, const Node&, const Node&) const;
42 void sameChunk(const Node&, unsigned long) const;
43 void patchRootNode(const Node&, const Element&) const;
44 void patchChildren(const Node&, const Element&) const;
53 #endif // __ddiff_hh__