2
|
1 |
/*
|
|
2 |
* Copyright (c) 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 the License "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 |
package com.nokia.carbide.cpp.internal.codescanner.config;
|
|
19 |
|
|
20 |
/**
|
|
21 |
* Enumeration for all existing script types of CodeScanner rules.
|
|
22 |
*
|
|
23 |
*/
|
|
24 |
public enum CSScript {
|
|
25 |
script_accessArrayElementWithoutCheck("accessArrayElementWithoutCheck"),
|
|
26 |
script_accessArrayElementWithoutCheck2("accessArrayElementWithoutCheck2"),
|
|
27 |
script_activestart("activestart"),
|
|
28 |
script_activestop("activestop"),
|
|
29 |
script_arraypassing("arraypassing"),
|
|
30 |
script_arrayptrcleanup("arrayptrcleanup"),
|
|
31 |
script_assertdebuginvariant("assertdebuginvariant"),
|
|
32 |
script_baddefines("baddefines"),
|
|
33 |
script_baseconstruct("baseconstruct"),
|
|
34 |
script_callActiveObjectWithoutCheckingOrStopping("callActiveObjectWithoutCheckingOrStopping"),
|
|
35 |
script_changenotification("changenotification"),
|
|
36 |
script_cleanup("cleanup"),
|
|
37 |
script_commentcode("commentcode"),
|
|
38 |
script_connect("connect"),
|
|
39 |
script_ConnectAndDontCloseMemberVariable("ConnectAndDontCloseMemberVariable"),
|
|
40 |
script_constnames("constnames"),
|
|
41 |
script_consttdescptr("consttdescptr"),
|
|
42 |
script_controlornull("controlornull"),
|
33
|
43 |
script_crepository("crepository"),
|
2
|
44 |
script_ctltargettype("ctltargettype"),
|
33
|
45 |
script_customizableicons("customizableicons"),
|
2
|
46 |
script_debugrom("debugrom"),
|
|
47 |
script_declarename("declarename"),
|
|
48 |
script_deleteMemberVariable("deleteMemberVariable"),
|
|
49 |
script_destructor("destructor"),
|
|
50 |
script_doubleSemiColon("doubleSemiColon"),
|
|
51 |
script_driveletters("driveletters"),
|
|
52 |
script_eikbuttons("eikbuttons"),
|
|
53 |
script_eikonenvstatic("eikonenvstatic"),
|
|
54 |
script_enummembers("enummembers"),
|
|
55 |
script_enumnames("enumnames"),
|
|
56 |
script_exportinline("exportinline"),
|
|
57 |
script_exportpurevirtual("exportpurevirtual"),
|
33
|
58 |
script_flags("flags"),
|
2
|
59 |
script_foff("foff"),
|
|
60 |
script_forbiddenwords("forbiddenwords"),
|
|
61 |
script_forgottoputptroncleanupstack("forgottoputptroncleanupstack"),
|
|
62 |
script_friend("friend"),
|
|
63 |
script_goto("goto"),
|
|
64 |
script_ifassignments("ifassignments"),
|
|
65 |
script_ifpreprocessor("ifpreprocessor"),
|
|
66 |
script_inheritanceorder("inheritanceorder"),
|
|
67 |
script_intleaves("intleaves"),
|
|
68 |
script_jmp("jmp"),
|
|
69 |
script_leave("leave"),
|
|
70 |
script_LeaveNoError("LeaveNoError"),
|
|
71 |
script_leavingoperators("leavingoperators"),
|
|
72 |
script_LFunctionCantLeave("LFunctionCantLeave"),
|
|
73 |
script_longlines("longlines"),
|
|
74 |
script_magicnumbers("magicnumbers"),
|
|
75 |
script_mclassdestructor("mclassdestructor"),
|
|
76 |
script_memberlc("memberlc"),
|
|
77 |
script_membervariablecallld("membervariablecallld"),
|
|
78 |
script_missingcancel("missingcancel"),
|
|
79 |
script_missingcclass("missingcclass"),
|
|
80 |
script_mmpsourcepath("mmpsourcepath"),
|
|
81 |
script_multilangrsc("multilangrsc"),
|
|
82 |
script_multipledeclarations("multipledeclarations"),
|
|
83 |
script_multipleinheritance("multipleinheritance"),
|
|
84 |
script_mydocs("mydocs"),
|
|
85 |
script_namespace("namespace"),
|
|
86 |
script_newlreferences("newlreferences"),
|
|
87 |
script_noleavetrap("noleavetrap"),
|
|
88 |
script_nonconsthbufc("nonconsthbufc"),
|
|
89 |
script_nonconsttdesc("nonconsttdesc"),
|
|
90 |
script_nonleavenew("nonleavenew"),
|
|
91 |
script_nonunicodeskins("nonunicodeskins"),
|
|
92 |
script_null("null"),
|
|
93 |
script_open("open"),
|
|
94 |
script_pointertoarrays("pointertoarrays"),
|
|
95 |
script_pragmadisable("pragmadisable"),
|
|
96 |
script_pragmamessage("pragmamessage"),
|
|
97 |
script_pragmaother("pragmaother"),
|
|
98 |
script_privateinheritance("privateinheritance"),
|
|
99 |
script_pushaddrvar("pushaddrvar"),
|
|
100 |
script_pushmember("pushmember"),
|
|
101 |
script_readresource("readresource"),
|
|
102 |
script_resourcenotoncleanupstack("resourcenotoncleanupstack"),
|
|
103 |
script_resourcesonheap("resourcesonheap"),
|
|
104 |
script_returndescriptoroutofscope("returndescriptoroutofscope"),
|
|
105 |
script_rfs("rfs"),
|
|
106 |
script_rssnames("rssnames"),
|
|
107 |
script_stringliterals("stringliterals"),
|
|
108 |
script_stringsinresourcefiles("stringsinresourcefiles"),
|
|
109 |
script_struct("struct"),
|
|
110 |
script_tcclasses("tcclasses"),
|
|
111 |
script_tclassdestructor("tclassdestructor"),
|
|
112 |
script_todocomments("todocomments"),
|
|
113 |
script_trapcleanup("trapcleanup"),
|
|
114 |
script_trapeleave("trapeleave"),
|
|
115 |
script_traprunl("traprunl"),
|
|
116 |
script_trspassing("trspassing"),
|
|
117 |
script_uids("uids"),
|
|
118 |
script_uncompressedaif("uncompressedaif"),
|
|
119 |
script_uncompressedbmp("uncompressedbmp"),
|
|
120 |
script_unicodesource("unicodesource"),
|
|
121 |
script_userafter("userafter"),
|
|
122 |
script_userfree("userfree"),
|
|
123 |
script_userWaitForRequest("userWaitForRequest"),
|
|
124 |
script_variablenames("variablenames"),
|
|
125 |
script_voidparameter("voidparameter"),
|
|
126 |
script_worryingcomments("worryingcomments"),
|
|
127 |
script_unknown("unknown");
|
|
128 |
|
|
129 |
private String name;
|
|
130 |
|
|
131 |
/**
|
|
132 |
* Constructor
|
|
133 |
*/
|
|
134 |
CSScript(String str) {
|
|
135 |
name = str;
|
|
136 |
}
|
|
137 |
|
|
138 |
/**
|
|
139 |
* Return the name of a CSSCript enum constant.
|
|
140 |
*/
|
|
141 |
public String toString() {
|
|
142 |
return name;
|
|
143 |
}
|
|
144 |
|
|
145 |
/**
|
|
146 |
* Return the CSScript enum constant with the specified name.
|
|
147 |
* @param name - name of the constant to return
|
|
148 |
* @return the CSScript enum constant with the specified name
|
|
149 |
*/
|
|
150 |
public static CSScript toScript(String name) {
|
|
151 |
try {
|
|
152 |
return valueOf(name);
|
|
153 |
}
|
|
154 |
catch (Exception e) {
|
|
155 |
return script_unknown;
|
|
156 |
}
|
|
157 |
}
|
|
158 |
|
|
159 |
}
|