[507] | 1 | /*! |
---|
| 2 | |
---|
[921] | 3 | \page coding_style LEMON Coding Style |
---|
[507] | 4 | |
---|
[811] | 5 | \section naming_conv Naming Conventions |
---|
[507] | 6 | |
---|
[667] | 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 |
---|
[921] | 12 | developing LEMON library. |
---|
[603] | 13 | |
---|
[614] | 14 | \subsection cs-class Classes and other types |
---|
[603] | 15 | |
---|
| 16 | The name of a class or any type should look like the following: |
---|
[507] | 17 | |
---|
| 18 | \code |
---|
| 19 | AllWordsCapitalizedWithoutUnderscores |
---|
| 20 | \endcode |
---|
| 21 | |
---|
[614] | 22 | \subsection cs-func Methods and other functions |
---|
[603] | 23 | |
---|
| 24 | The name of a function should look like the following: |
---|
[507] | 25 | |
---|
| 26 | \code |
---|
| 27 | firstWordLowerCaseRestCapitalizedWithoutUnderscores |
---|
| 28 | \endcode |
---|
| 29 | |
---|
[614] | 30 | \subsection cs-funcs Constants, Macros |
---|
[603] | 31 | |
---|
| 32 | The names of constants and macros should look like the following: |
---|
[507] | 33 | |
---|
| 34 | \code |
---|
| 35 | ALL_UPPER_CASE_WITH_UNDERSCORES |
---|
| 36 | \endcode |
---|
| 37 | |
---|
[614] | 38 | \subsection cs-loc-var Class and instance member variables, auto variables |
---|
[507] | 39 | |
---|
[603] | 40 | The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following: |
---|
[507] | 41 | |
---|
| 42 | \code |
---|
| 43 | all_lower_case_with_underscores |
---|
| 44 | \endcode |
---|
| 45 | |
---|
[614] | 46 | \subsection cs-excep Exceptions |
---|
[507] | 47 | |
---|
[603] | 48 | When writing exceptions please comply the following naming conventions: |
---|
| 49 | |
---|
[507] | 50 | \code |
---|
| 51 | ClassNameEndsWithException |
---|
| 52 | \endcode |
---|
| 53 | |
---|
[811] | 54 | \warning In some cases we diverge from these rules. |
---|
| 55 | This primary done because STL uses different naming convention and |
---|
| 56 | in certain cases |
---|
| 57 | it is beneficial to provide STL compatible interface. |
---|
[507] | 58 | |
---|
| 59 | */ |
---|