- All classes, variables, and class belong to the namespace pinapa (or a nested namespace).
- State variables of classes are prefixed by m_, and should be private. If necessary, accessors will be created : get_...() or is_...() and set_...().
- Variable, class, and function name are all lower case. Words are separated by underscores.
- When using reference semantics (A variable is a pointer to an object), the name of the class is prefixed with "st_", (for STruct), and a typedef is used to name the type of the pointer. See for example the class pinapa::st_backend, and its typedef pinapa::backend.
- When a class has several non-trivial constructors, the common code of the constructors must be factored in a protected method called build_XXX, where XXX is the name of the class (without any prefix).
- The class names must be singular, and variable names may be plural when refering to a list or array.
- C files must be named *.c, C++ files must be named *.cpp, and both C and C++ header files must be named *.h
- Any function declared in a .h file must be implemented in the corresponding .c or .cpp file.
The GNU indentation style is used. (Emacs's default).
The program is written in C++, and use it's feature when necessary. However, the use of multiple inheritance is avoided as much as possible, and limited to multiple inheritance of function. (If a class inherits from several classes, then, at most one of the classes can have data members.).
The whole program should compile with g++ -Wall with no warning.
Double C++ comments are used for deprecated code, that will be removed when we are sure it is not usefull.
The parser is documented with doxygen (
http://www.doxygen.org). Programmers should comment their code with doxygen comments while coding.