CrystalFp
 All Classes Namespaces Files Functions Enumerations Enumerator Pages
C++ Coding Standard

Here are collected few rules for coding this project.

Class names

Class names are CamelCase with first letter uppercase.

Ex: CrystalFp

Class data members

Class methods names are CamelCase with the first letter lowercase.

Ex: addStructureBatch

There is one exception: when the function mimics some well know one like size(), clean(), serialize().

Class data members

Class member variables names start with 'm' followed by CamelCase name.

Ex: mDistanceMatrix

Function arguments

Function arguments names start with 'a' followed by CamelCase name.

Ex: aEnergyThreshold

Constants and enumeration

Constants and enumerations are all uppercase with words separated by '_'. The first letters specify the kind of constant (like: STS_ status, OPT_ option value).

Ex: OPT_GROUPING_METHOD

Temporary variables

All the other variables are all lower case with parts separated by '_'.

Ex: max_basis_len

Global data

Global variables should be avoided, but if present their names should start with 'g' followed by CamelCase name.

Ex: gFgBranch

Miscellaneous rules

In case of error main should return 1.

Counters should be unsigned int. But beware of down counting for loops.