Naming Conventions

The names of classes, attributes, services, variables, and functions in a program serve as comments of a sort. So don't choose terse names-instead, look for names that give useful information about the meaning of the variable or function. In a OOFEM program, names should be English, like other comments.

Local variable names can be shorter, because they are used only within one context, where (presumably) comments explain their purpose.

Try to limit your use of abbreviations in symbol names. It is ok to make a few abbreviations, explain what they mean, and then use them frequently, but don't use lots of obscure abbreviations.

Please use capital letters to separate words in a name. Stick to lower case; reserve upper case for macros, and for name-prefixes that follow a uniform convention. The function or service name should always begin with lovercase letter, the first uppercase letter in function name indicates, that function is returning newly allocated pointer, which has to be dealocated. For example, you should use names like ignoreSpaceChangeFlag;

When you want to define names with constant integer values, use enum rather than `#define'. GDB knows about enumeration constants.

Use descriptive file names. The class declarations should be placed in *.h files and class implementation in corresponding *.C files. For each class, create a separate files.

Borek Patzak 2018-01-02