| author | noe\swadi |
| Mon, 26 Apr 2010 16:28:13 +0530 | |
| changeset 3 | ebe3f8f03b59 |
| parent 0 | 638b9c697799 |
| permissions | -rw-r--r-- |
| 0 | 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 FUNCTIONNODEANALYSIS_H_ |
|
20 |
#define FUNCTIONNODEANALYSIS_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 |
template <TIssueType IssueType> |
|
|
3
ebe3f8f03b59
Compatibility Analyser updated to version 2.8.4. Support for Qt code analysis added.
noe\swadi
parents:
0
diff
changeset
|
34 |
void AddIssueFunction(const HANodeIterator* self,TIssueIdentity funcType, const HANodeIterator& ignorenode, int lineNo, |
|
ebe3f8f03b59
Compatibility Analyser updated to version 2.8.4. Support for Qt code analysis added.
noe\swadi
parents:
0
diff
changeset
|
35 |
const string& issueloc, const XMLCh* fileid=NULL) |
| 0 | 36 |
{
|
37 |
switch (funcType) |
|
38 |
{
|
|
39 |
case EIssueIdentityExportedFunction: |
|
|
3
ebe3f8f03b59
Compatibility Analyser updated to version 2.8.4. Support for Qt code analysis added.
noe\swadi
parents:
0
diff
changeset
|
40 |
AddIssue<EIssueIdentityExportedFunction,IssueType>(self,ignorenode,lineNo,issueloc,fileid); |
| 0 | 41 |
break; |
42 |
case EIssueIdentityInlineFunction: |
|
|
3
ebe3f8f03b59
Compatibility Analyser updated to version 2.8.4. Support for Qt code analysis added.
noe\swadi
parents:
0
diff
changeset
|
43 |
AddIssue<EIssueIdentityInlineFunction,IssueType>(self,ignorenode,lineNo,issueloc,fileid); |
| 0 | 44 |
break; |
45 |
default: |
|
46 |
assert(false); |
|
47 |
break; |
|
48 |
||
49 |
}; |
|
50 |
||
51 |
} |
|
52 |
||
53 |
/** |
|
54 |
* Changes in function signatures are analyzed. Any change in the signature of an |
|
55 |
* accessible function is considered to be a binary break. |
|
56 |
*/ |
|
57 |
class FunctionNodeAnalysis: public NodeAnalysis |
|
58 |
{
|
|
59 |
public: |
|
60 |
/** |
|
61 |
* Constructor |
|
62 |
* @return pointer NodeAnalysis object |
|
63 |
*/ |
|
64 |
static NodeAnalysis* Construct(); |
|
65 |
public: |
|
66 |
||
67 |
FunctionNodeAnalysis(); |
|
68 |
||
69 |
/** |
|
70 |
* Finds node to analyse it |
|
71 |
* @param baseline baseline node |
|
72 |
* @param current current node |
|
73 |
* @return 0, if there was no issues |
|
74 |
*/ |
|
75 |
int FindNodeAndAnalyse(HANodeIterator baseline,HANodeIterator current); |
|
76 |
||
77 |
/** |
|
78 |
* Analyse |
|
79 |
* @param baseline baseline node |
|
80 |
* @param current current node |
|
81 |
* @param report report or not (default= true) |
|
82 |
* @return 0, if there was no issues |
|
83 |
*/ |
|
84 |
int Analyse(HANodeIterator baseline,HANodeIterator current, bool report = true); |
|
85 |
||
86 |
/** |
|
87 |
* Destructor |
|
88 |
*/ |
|
89 |
~FunctionNodeAnalysis(){}
|
|
90 |
||
91 |
private: |
|
92 |
//! Type of function found |
|
93 |
TIssueIdentity iFuncType; |
|
94 |
}; |
|
95 |
||
96 |
#endif |