|
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 UNIONNODEANALYSIS_H_ |
|
20 #define UNIONNODEANALYSIS_H_ |
|
21 |
|
22 #ifdef __WIN__ |
|
23 #pragma warning(disable:4786) |
|
24 #endif |
|
25 #include <xercesc/dom/DOM.hpp> |
|
26 #include "HANodeIterator.h" |
|
27 #include "ClassNodeAnalysis.h" |
|
28 |
|
29 using namespace std; |
|
30 |
|
31 XERCES_CPP_NAMESPACE_USE |
|
32 |
|
33 class UnionNodeAnalysis: public ClassNodeAnalysis |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Constructor |
|
38 * @return pointer NodeAnalysis object |
|
39 */ |
|
40 static NodeAnalysis* Construct(); |
|
41 public: |
|
42 /** |
|
43 * Finds node to analyse it |
|
44 * @param baseline baseline node |
|
45 * @param current current node |
|
46 * @return 0, if there was no issues |
|
47 */ |
|
48 int FindNodeAndAnalyse(HANodeIterator baseline,HANodeIterator current); |
|
49 |
|
50 /** |
|
51 * Constructor |
|
52 */ |
|
53 UnionNodeAnalysis(); |
|
54 |
|
55 /** |
|
56 * Destructor |
|
57 */ |
|
58 ~UnionNodeAnalysis(){} |
|
59 |
|
60 protected: |
|
61 /** |
|
62 * Compare base sizes |
|
63 * @param baseline to which to compare |
|
64 * @param current what to compare |
|
65 * @param bfields |
|
66 * @param cfields |
|
67 * @param report if true finding are reported |
|
68 * @return 0 meaningless with union as it can not be derived |
|
69 */ |
|
70 virtual int compareBaseSizes(HANodeIterator baseline, HANodeIterator current, |
|
71 const NodeIndex::dtable_t& bfields, const NodeIndex::dtable_t& cfields, |
|
72 bool report); |
|
73 |
|
74 /** |
|
75 * Compare virtual functions |
|
76 * @param baseline baseline HANodeIterator |
|
77 * @param current current HANodeIterator |
|
78 * @param bvirtualMethods vector of baseline virtual methods |
|
79 * @param cvirtualMethods vector of current virtual methods |
|
80 * @param report if true finding are reported |
|
81 * @return true if match found |
|
82 */ |
|
83 virtual int compareVirtualFunctions(HANodeIterator baseline,HANodeIterator current, |
|
84 const vector<DOMNode*>& bvirtualMethods, |
|
85 const vector<DOMNode*>& cvirtualMethods, |
|
86 bool report); |
|
87 }; |
|
88 |
|
89 #endif |