|
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 VARIABLENODEANALYSIS_H_ |
|
20 #define VARIABLENODEANALYSIS_H_ |
|
21 |
|
22 #ifdef __WIN__ |
|
23 #pragma warning(disable:4786) |
|
24 #endif |
|
25 #include <xercesc/dom/DOM.hpp> |
|
26 #include "HANodeIterator.h" |
|
27 #include "NodeAnalysis.h" |
|
28 |
|
29 |
|
30 using namespace std; |
|
31 |
|
32 XERCES_CPP_NAMESPACE_USE |
|
33 |
|
34 |
|
35 /** |
|
36 * The constants are analyzed for changes in initialization values. Any change in |
|
37 * an initialization value is considered a binary break. |
|
38 */ |
|
39 class VariableNodeAnalysis: public NodeAnalysis |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Constructor |
|
44 * @return pointer NodeAnalysis object |
|
45 */ |
|
46 static NodeAnalysis* Construct(); |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Finds node and analyse it |
|
51 * @param baseline baseline node |
|
52 * @param current current node |
|
53 * @return 0, if there was no issues |
|
54 */ |
|
55 int FindNodeAndAnalyse(HANodeIterator baseline,HANodeIterator current); |
|
56 |
|
57 /** |
|
58 * Analyse node for variables |
|
59 * @param baseline baseline node |
|
60 * @param current current node |
|
61 * @param report report or not (default= true) |
|
62 * @return 0, if there was no issues |
|
63 */ |
|
64 int Analyse(HANodeIterator baseline,HANodeIterator current, bool report = true); |
|
65 |
|
66 /** |
|
67 * Destructor |
|
68 */ |
|
69 ~VariableNodeAnalysis(){} |
|
70 }; |
|
71 |
|
72 #endif |