|
1 /* |
|
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NODEANALYSIS_H_ |
|
20 #define NODEANALYSIS_H_ |
|
21 |
|
22 #ifdef __WIN__ |
|
23 #pragma warning(disable:4786) |
|
24 #endif |
|
25 #include <list> |
|
26 #include <xercesc/dom/DOM.hpp> |
|
27 #include "HANodeIterator.h" |
|
28 |
|
29 using namespace std; |
|
30 |
|
31 XERCES_CPP_NAMESPACE_USE |
|
32 |
|
33 class NodeAnalysis |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Finds node analyser |
|
38 * @param baseline baseline node |
|
39 * @return pointer NodeAnalysys object |
|
40 */ |
|
41 static NodeAnalysis* FindNodeAnalyser(HANodeIterator baseline); |
|
42 |
|
43 typedef NodeAnalysis* (*Constructor)(); |
|
44 |
|
45 /** |
|
46 * Finds node |
|
47 * @param nodetofind node to find |
|
48 * @param findfrom where to find node from |
|
49 * @return 0, if there was no issues |
|
50 */ |
|
51 static DOMNode* findNode(HANodeIterator nodetofind, HANodeIterator findfrom); |
|
52 public: |
|
53 |
|
54 /** |
|
55 * Finds node to analyse it |
|
56 * @param baseline baseline node |
|
57 * @param current current node |
|
58 * @return 0, if there was no issues |
|
59 */ |
|
60 virtual int FindNodeAndAnalyse(HANodeIterator baseline,HANodeIterator current)=0; |
|
61 |
|
62 /** |
|
63 * Analyse |
|
64 * @param baseline baseline node |
|
65 * @param current current node |
|
66 * @param report report or not (default= true) |
|
67 * @return 0, if there was no issues |
|
68 */ |
|
69 virtual int Analyse(HANodeIterator baseline,HANodeIterator current, bool report = true)=0; |
|
70 |
|
71 /** |
|
72 * Destructor |
|
73 */ |
|
74 virtual ~NodeAnalysis(){} |
|
75 }; |
|
76 |
|
77 #endif |