COIN-OR::LEMON - Graph Library

source: lemon-0.x/doc/coding_style.dox @ 1517:b303c1741c9a

Last change on this file since 1517:b303c1741c9a was 1083:8043b93e5973, checked in by Alpar Juttner, 19 years ago

Doc improvements

File size: 2.0 KB
Line 
1/*!
2
3\page coding_style LEMON Coding Style
4
5\section naming_conv Naming Conventions
6
7In order to make development easier we have made some conventions
8according to coding style. These include names of types, classes,
9functions, variables, constants and exceptions. If these conventions
10are met in one's code then it is easier to read and maintain
11it. Please comply with these conventions if you want to contribute
12developing LEMON library.
13
14\warning In some cases we diverge from these rules.
15This primary done because STL uses different naming convention and
16in certain cases
17it is beneficial to provide STL compatible interface.
18
19\subsection cs-files File Names
20
21The header file names should look like the following.
22
23\code
24header_file.h
25\endcode
26
27Note that all standard LEMON headers are located in the \c lemon subdirectory,
28so you should include them from C++ source like this:
29
30\code
31#include <lemon/header_file.h>
32\endcode
33
34The source code files use the same style and they have '.cc' extension.
35
36\code
37source_code.cc
38\endcode
39
40\subsection cs-class Classes and other types
41
42The name of a class or any type should look like the following.
43
44\code
45AllWordsCapitalizedWithoutUnderscores
46\endcode
47
48\subsection cs-func Methods and other functions
49
50The name of a function should look like the following.
51
52\code
53firstWordLowerCaseRestCapitalizedWithoutUnderscores
54\endcode
55
56\subsection cs-funcs Constants, Macros
57
58The names of constants and macros should look like the following.
59
60\code
61ALL_UPPER_CASE_WITH_UNDERSCORES
62\endcode
63
64\subsection cs-loc-var Class and instance member variables, auto variables
65
66The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following.
67
68\code
69all_lower_case_with_underscores
70\endcode
71
72\subsection cs-excep Exceptions
73
74When writing exceptions please comply the following naming conventions.
75
76\code
77ClassNameEndsWithException
78\endcode
79
80\section header-template Template Header File
81
82Each LEMON header file should look like this:
83
84\include template.h
85
86*/
Note: See TracBrowser for help on using the repository browser.