Difference between revisions of "File naming and programming rules"

From Mca2
Jump to navigationJump to search
m (Fixed some typos and language issues)
(Programming rules)
Line 1: Line 1:
 
The following rules are obligatory for all mca2 core developers. They are recommended to all users of mca2.
 
The following rules are obligatory for all mca2 core developers. They are recommended to all users of mca2.
  
= Programming rules =
+
Please have a look into the MCA2 Programmers Guide for informations on this topic.
 
 
== Typedefs ==
 
== Classes ==
 
Class names should start with a 't' (for type) followed by the name starting with a capital letter.
 
If the name consists of several words, they have to be concatenated directly, each word starting with a capital letter.
 
<pre>
 
class tThisIsAClass;
 
</pre>
 
 
 
Exceptions of this rules are mca modules and mca groups. They start with a leading 'm' resp. 'g'.
 
<pre>
 
class mThisIsAModule: tModule {...};
 
class mThisIsAGroup: tGroup {...};
 
</pre>
 
== Variables ==
 
TODO
 
== Enumerations ==
 
TODO
 
== Includes ==
 
<pre>
 
#include "" for MCA2 includes
 
#include <> for non-MCA2 includes
 
</pre>
 
== Comments ==
 
TODO
 
  
 
= File Names =
 
= File Names =

Revision as of 11:03, 11 January 2006

The following rules are obligatory for all mca2 core developers. They are recommended to all users of mca2.

Please have a look into the MCA2 Programmers Guide for informations on this topic.

File Names

  • If a file contains only one class (this is the usual case), the file must have the same name as the class:
tThisIsAClass.h
tThisIsAClass.c
tThisIsAClass.cc
mThisIsAModule.h
gThisIsAGroup.C
  • If a file contains a template, the filename has to end with a 'T':
tThisIsATemplateT.h
  • Parts start with a 'p':
pReplyValues.C