1 /* -*- C++ -*- |
1 /* -*- mode: C++; indent-tabs-mode: nil; -*- |
2 * |
2 * |
3 * This file is a part of LEMON, a generic C++ optimization library |
3 * This file is a part of LEMON, a generic C++ optimization library. |
4 * |
4 * |
5 * Copyright (C) 2003-2008 |
5 * Copyright (C) 2003-2008 |
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 * (Egervary Research Group on Combinatorial Optimization, EGRES). |
7 * (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 * |
8 * |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
19 /*! |
19 /*! |
20 |
20 |
21 \page coding_style LEMON Coding Style |
21 \page coding_style LEMON Coding Style |
22 |
22 |
23 \section naming_conv Naming Conventions |
23 \section naming_conv Naming Conventions |
24 |
24 |
25 In order to make development easier we have made some conventions |
25 In order to make development easier we have made some conventions |
26 according to coding style. These include names of types, classes, |
26 according to coding style. These include names of types, classes, |
66 \subsection cs-class Classes and other types |
66 \subsection cs-class Classes and other types |
67 |
67 |
68 The name of a class or any type should look like the following. |
68 The name of a class or any type should look like the following. |
69 |
69 |
70 \code |
70 \code |
71 AllWordsCapitalizedWithoutUnderscores |
71 AllWordsCapitalizedWithoutUnderscores |
72 \endcode |
72 \endcode |
73 |
73 |
74 \subsection cs-func Methods and other functions |
74 \subsection cs-func Methods and other functions |
75 |
75 |
76 The name of a function should look like the following. |
76 The name of a function should look like the following. |
77 |
77 |
78 \code |
78 \code |
79 firstWordLowerCaseRestCapitalizedWithoutUnderscores |
79 firstWordLowerCaseRestCapitalizedWithoutUnderscores |
80 \endcode |
80 \endcode |
81 |
81 |
82 \subsection cs-funcs Constants, Macros |
82 \subsection cs-funcs Constants, Macros |
83 |
83 |
84 The names of constants and macros should look like the following. |
84 The names of constants and macros should look like the following. |
85 |
85 |
86 \code |
86 \code |
87 ALL_UPPER_CASE_WITH_UNDERSCORES |
87 ALL_UPPER_CASE_WITH_UNDERSCORES |
88 \endcode |
88 \endcode |
89 |
89 |
90 \subsection cs-loc-var Class and instance member variables, auto variables |
90 \subsection cs-loc-var Class and instance member variables, auto variables |
91 |
91 |
92 The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following. |
92 The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following. |
93 |
93 |
94 \code |
94 \code |
95 all_lower_case_with_underscores |
95 all_lower_case_with_underscores |
96 \endcode |
96 \endcode |
97 |
97 |
98 \subsection pri-loc-var Private member variables |
98 \subsection pri-loc-var Private member variables |
99 |
99 |
100 Private member variables should start with underscore |
100 Private member variables should start with underscore |