File naming and programming rules

From Mca2
Revision as of 16:14, 5 January 2006 by Scholl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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

Programming rules

Typedefs

Classes

Class names should start with a 't' (for type) followed by the Name starting with a capital letter. Does the name consist of several words, they have to be concatenated directly, each word starting with a capital letter.

class tThisIsAClass;

Exceptions of this rules are mca modules and mca groups. They start with a leading 'm' resp. 'g'.

class mThisIsAModule: tModule {...};
class mThisIsAGroup: tGroup {...};

Variables

TODO

Enumerations =

TODO

Includes

#include "" for MCA2 includes
#include <> for non-MCA2 includes

Comments

TODO

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