3 \page coding_style LEMON Coding Style
5 \section naming_conv Naming Conventions
7 In order to make development easier we have made some conventions
8 according to coding style. These include names of types, classes,
9 functions, variables, constants and exceptions. If these conventions
10 are met in one's code then it is easier to read and maintain
11 it. Please comply with these conventions if you want to contribute
12 developing LEMON library.
14 \note When the coding style requires the capitalization of an abbreviation,
15 only the first letter should be upper case.
22 \warning In some cases we diverge from these rules.
23 This primary done because STL uses different naming convention and
25 it is beneficial to provide STL compatible interface.
27 \subsection cs-files File Names
29 The header file names should look like the following.
35 Note that all standard LEMON headers are located in the \c lemon subdirectory,
36 so you should include them from C++ source like this:
39 #include <lemon/header_file.h>
42 The source code files use the same style and they have '.cc' extension.
48 \subsection cs-class Classes and other types
50 The name of a class or any type should look like the following.
53 AllWordsCapitalizedWithoutUnderscores
56 \subsection cs-func Methods and other functions
58 The name of a function should look like the following.
61 firstWordLowerCaseRestCapitalizedWithoutUnderscores
64 \subsection cs-funcs Constants, Macros
66 The names of constants and macros should look like the following.
69 ALL_UPPER_CASE_WITH_UNDERSCORES
72 \subsection cs-loc-var Class and instance member variables, auto variables
74 The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following.
77 all_lower_case_with_underscores
80 \subsection cs-excep Exceptions
82 When writing exceptions please comply the following naming conventions.
85 ClassNameEndsWithException
91 ClassNameEndsWithError
94 \section header-template Template Header File
96 Each LEMON header file should look like this: