|
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 ENUMNODEANALYSIS_H_ |
|
20 #define ENUMNODEANALYSIS_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 using namespace std; |
|
30 |
|
31 XERCES_CPP_NAMESPACE_USE |
|
32 |
|
33 |
|
34 /** |
|
35 * The enumerations for changes in initialization values and order are analyzed. Any change in the |
|
36 * accessible enumerations is considered to be a binary break. Removed or changed enumerations, |
|
37 * and a removal or a change in accessible enumerations inside a class are reported. |
|
38 */ |
|
39 class EnumNodeAnalysis: public NodeAnalysis |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Constructor |
|
45 * @return pointer NodeAnalysis object |
|
46 */ |
|
47 static NodeAnalysis* Construct(); |
|
48 public: |
|
49 /** |
|
50 * Finds node to 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 enums |
|
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 * Check enum value |
|
68 * @param baseline baseline node |
|
69 * @param current current node |
|
70 * @return true if enums match |
|
71 */ |
|
72 bool CheckEnumValue(HANodeIterator baseline,HANodeIterator current); |
|
73 |
|
74 /** |
|
75 * Destructor |
|
76 */ |
|
77 ~EnumNodeAnalysis(){} |
|
78 }; |
|
79 |
|
80 #endif |