1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <ConventionConfigurations>
4 <ALICECodingRules check = "true">
5 <Rules category = "NamingRules" check = "true">
8 <Description>@ No special characters in names are allowed (_,#,$,&,@,-,%).</Description>
12 <Description>@ Header file names are derived from the
13 @ class name and have the suffix ".h" (Classname.h).</Description>
17 <Description>@ Implementation file names are derived from
18 @ the class name and have the suffix ".cxx" (Classname.cxx).</Description>
22 <Description>@ Class name starts with the prefix "Ali".</Description>
26 <Description>@ Class names follow the general rule RN3.</Description>
30 <Description>@ Member function names start with a capital.</Description>
34 <Description>@ Member function names follow the general rule RN3.</Description>
38 <Description>@ Data member names start with a prefix "f".</Description>
42 <Description>@ Data member names follow the general rule RN3.</Description>
46 <Description>@ Local variables names start with a lower case letter.</Description>
50 <Description>@ Local variable names follow the general rule RN3.</Description>
54 <Description>@ Global non-constant, objects names start with a
55 @ prefix "gAli". Global constant objects names start
56 @ with a prefix "k".</Description>
60 <Description>@ Global variables names follow the general rule RN3.</Description>
64 <Description>@ Constants, including names in enumeration
65 @ types and constant statics start with a prefix "k".</Description>
69 <Description>@ Constant names follow the general rule RN3.</Description>
73 <Description>@ Static data members names start with a prefix "fg",
74 @ constant data members names start with a prefix "fk",
75 @ static constant data members start with a prefix "fgk".</Description>
79 <Description>@ Special data member names follow the general rule RN3.</Description>
82 <Rules category = "CodingRules" check = "true">
85 <Description>@ Header files begin and end with multiple-inclusion
86 @ protection, as follows:
91 @ where CLASSNAME is constructed from the name of
92 @ class by converting all letters to capitals.</Description>
96 <Description>@ Header files should hold the definition of a single
97 @ class. It is possible to define more classes in one
98 @ header file only if these classes are embedded.</Description>
100 <Rule check = "true">
102 <Description>@ Implementation files should hold all the member
103 @ function definitions for a single class (or embedded
104 @ classes) as defined in the corresponding header file.</Description>
106 <Rule check = "true">
108 <Description>@ All declarations are declared with friend first
109 @ (if there are any), then public, protected and private.</Description>
111 <Rule check = "true">
113 <Description>@ Usage of global variables should be avoided: they
114 @ should be encapsulated in a class. However global
115 @ variables pointing to the main object of a package can occur
116 @ (e.g. gAlice in AliRoot package).</Description>
118 <Rule check = "true">
120 <Description>@ The usage of friend classes should be avoided apart
121 @ from I/O overloading where it is needed.</Description>
123 <Rule check = "true">
125 <Description>@ All classes containing at least on virtual function
126 @ MUST have a virtual destractor.</Description>
128 <Rule check = "true">
130 <Description>@ A class that has a member datum with a type which is
131 @ a built-in pointer should have a copy constructor and
132 @ an assignment operator.</Description>
134 <Rule check = "true">
136 <Description>@ Make const all member functions that are not supposed
137 @ to change member data.</Description>
139 <Rule check = "true">
141 <Description>@ Dummy argument names in member function declarations
142 @ should be always provided, apart from arguments that are not used.</Description>
144 <Rule check = "true">
146 <Description>@ All class data members should be declared as
147 @ "private" or "protected".</Description>
149 <Rule check = "true">
151 <Description>@ Structures can be used only for accessing FORTRAN
152 @ common blocks, functions from external libraries, or internally
153 @ within a class. They can have only data members and eventually a
154 @ default constructor, member functions are not allowed. Classes
155 @ should be used instead in all other cases.</Description>
157 <Rule check = "true">
159 <Description>@ Using the following words or phrases
160 @ is not allowed in output statements.
161 @ Segmentation violation
165 @ Floating point exception
167 @ Busy flag cleared</Description>
169 <Rule check = "true">
171 <Description>@ Floating point numbers must not be compared
172 @ with the "==" or "!=" operators , but with
173 @ an appropriate function that calculates
174 @ how close the two values are to each other.
175 @ If the two numbers are "close enough",
176 @ then we call them equal. This rule does
177 @ not apply to the variables just after
178 @ initialization whose value is not
179 @ affected by rounding errors.</Description>
181 <Rule check = "true">
183 <Description>@ Data members of a class must not be redefined
184 @ in derived classes.</Description>
186 <Rule check = "true">
188 <Description>@ In parameters of a method, objects that are
189 @ passed by pointer or by reference and that are not
190 @ modified should be declared const.</Description>
192 <Rule check = "true">
194 <Description>@ Default constructors and constructors which have
195 @ TRootIOCtor* as parameter type should not allocate
196 @ memory to data members.</Description>
198 <Rule check = "true">
200 <Description>@ The constant static data members of the basic
201 @ types should be initialized in the header file
202 @ and static data members in the implementation file.</Description>
204 <Rule check = "true">
206 <Description>@ The static data members of the object types
207 @ should be avoided. A static access function
208 @ returning a reference to the local static
209 @ variable should be used instead.</Description>
211 <Rule check = "true">
213 <Description>@ In the destructor, its not necessary to check
214 @ if a data member pointer is zero before
215 @ deleting it and/or to set it to zero.</Description>
217 <Rule check = "true">
219 <Description>@ When using math routines, use Root::TMath:: versions.</Description>
222 <Rules category = "Guidelines" check = "true">
223 <Rule check = "true">
225 <Description>@ To be careful especially with using exceptions,
226 @ and templates</Description>
228 <Rule check = "true">
230 <Description>@ When only referring to pointers or references to
231 @ types defined in the header file its often not necessary to
232 @ include that file. It may be sufficient to use forward declaration.</Description>
235 <Rules category = "StyleRules" check = "true">
236 <Rule check = "true">
238 <Description>@ Each class contains a description of the class
239 @ functionality placed at the beginning of the class header
240 @ file and an extensive description at the beginning of the
241 @class implementation file.</Description>
243 <Rule check = "true">
245 <Description>@ All data members of a class are described by a short
246 @comment following the data member declaration on the same line.</Description>
248 <Rule check = "true">
250 <Description>@ Member functions comments in implementation files should
251 @ be put on the new line after the first "{".</Description>
253 <Rule check = "true">
255 <Description>@ Header files should not have method body inside the class
256 @ definitions in case they do not fit on one or two lines or when the
257 @ inline function has unused arguments. The bodies of "inline" functions
258 @ should go to the end of the header file after the class definition.</Description>
260 <Rule check = "true">
262 <Description>@ There is no need to use the keyword "inline" when defining
263 @ the body of a function in the class definition.</Description>
268 <String>Segmentation violation</String>
269 <String>Segmentation fault</String>
270 <String>Bus error</String>
271 <String>Abort</String>
272 <String>Floating point exception</String>
273 <String>Segmentation fault</String>
274 <String>Killed</String>
275 <String>Busy flag cleared</String>
279 <ROOTCodingRules check = "true">
280 <Rules category = "NamingRules" check = "true">
281 <Rule check = "true">
283 <Description>@ No special characters in names are allowed (_,#,$,&,@,-,%).</Description>
285 <Rule check = "true">
287 <Description>@ Types begin with a capital letter and end with '_t'.</Description>
289 <Rule check = "true">
291 <Description>@ Base classes begin with 'T'.</Description>
293 <Rule check = "true">
295 <Description>@ Enumeration types begin with 'E'.</Description>
297 <Rule check = "true">
299 <Description>@ Avoid raw C types, we check for the non-portable (memory-wise) types
300 @ 'long', 'unsigned long', 'long double', 'bool', 'long long' and
301 @ 'unsigned long long'.</Description>
303 <Rule check = "true">
305 <Description>@ Attributes begin with 'f' and function begin with a capital letter.</Description>
307 <Rule check = "true">
309 <Description>@ Global static variables begin with 'g'.</Description>
311 <Rule check = "true">
313 <Description>@ Static data members begin with 'fg'.</Description>
315 <Rule check = "true">
317 <Description>@ Local variables and parameters begin with a lowercase word.</Description>
319 <Rule check = "true">
321 <Description>@ Constants begin with 'k', including names of enumeration,
322 @ constants and constant statics.</Description>
325 <Rules category = "StyleRules" check = "true">
326 <Rule check = "true">
328 <Description>@ <TAB> used for indentation.</Description>
330 <Rule check = "true">
332 <Description>@ <SPACE> of 3 should be used for indentation.</Description>
334 <Rule check = "true">
336 <Description>@ Comments should be written after ClassDef(...,#).</Description>
338 <Rule check = "true">
340 <Description>@ Member functions' comments should be put on the new line after the first "{".</Description>
345 </ConventionConfigurations>