1 | 1 |
/* -*- C++ -*- |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library |
4 | 4 |
* |
5 | 5 |
* Copyright (C) 2003-2008 |
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
9 | 9 |
* Permission to use, modify and distribute this software is granted |
10 | 10 |
* provided that this copyright notice appears in all copies. For |
11 | 11 |
* precise terms see the accompanying LICENSE file. |
12 | 12 |
* |
13 | 13 |
* This software is provided "AS IS" with no warranty of any kind, |
14 | 14 |
* express or implied, and with no claim as to its suitability for any |
15 | 15 |
* purpose. |
16 | 16 |
* |
17 | 17 |
*/ |
18 | 18 |
|
19 | 19 |
/*! |
20 | 20 |
|
21 | 21 |
\page coding_style LEMON Coding Style |
22 | 22 |
|
23 | 23 |
\section naming_conv Naming Conventions |
24 | 24 |
|
25 | 25 |
In order to make development easier we have made some conventions |
26 | 26 |
according to coding style. These include names of types, classes, |
27 | 27 |
functions, variables, constants and exceptions. If these conventions |
28 | 28 |
are met in one's code then it is easier to read and maintain |
29 | 29 |
it. Please comply with these conventions if you want to contribute |
30 | 30 |
developing LEMON library. |
31 | 31 |
|
32 | 32 |
\note When the coding style requires the capitalization of an abbreviation, |
33 | 33 |
only the first letter should be upper case. |
34 | 34 |
|
35 | 35 |
\code |
36 | 36 |
XmlReader |
37 | 37 |
\endcode |
38 | 38 |
|
39 | 39 |
|
40 | 40 |
\warning In some cases we diverge from these rules. |
41 |
This primary done because STL uses different naming convention and |
|
41 |
This is primary done because STL uses different naming convention and |
|
42 | 42 |
in certain cases |
43 | 43 |
it is beneficial to provide STL compatible interface. |
44 | 44 |
|
45 | 45 |
\subsection cs-files File Names |
46 | 46 |
|
47 | 47 |
The header file names should look like the following. |
48 | 48 |
|
49 | 49 |
\code |
50 | 50 |
header_file.h |
51 | 51 |
\endcode |
52 | 52 |
|
53 | 53 |
Note that all standard LEMON headers are located in the \c lemon subdirectory, |
54 | 54 |
so you should include them from C++ source like this: |
55 | 55 |
|
56 | 56 |
\code |
57 | 57 |
#include <lemon/header_file.h> |
58 | 58 |
\endcode |
59 | 59 |
|
60 | 60 |
The source code files use the same style and they have '.cc' extension. |
61 | 61 |
|
62 | 62 |
\code |
63 | 63 |
source_code.cc |
64 | 64 |
\endcode |
65 | 65 |
|
66 | 66 |
\subsection cs-class Classes and other types |
67 | 67 |
|
68 | 68 |
The name of a class or any type should look like the following. |
69 | 69 |
|
70 | 70 |
\code |
71 | 71 |
AllWordsCapitalizedWithoutUnderscores |
72 | 72 |
\endcode |
73 | 73 |
|
74 | 74 |
\subsection cs-func Methods and other functions |
75 | 75 |
|
76 | 76 |
The name of a function should look like the following. |
77 | 77 |
|
78 | 78 |
\code |
79 | 79 |
firstWordLowerCaseRestCapitalizedWithoutUnderscores |
80 | 80 |
\endcode |
81 | 81 |
|
82 | 82 |
\subsection cs-funcs Constants, Macros |
83 | 83 |
|
84 | 84 |
The names of constants and macros should look like the following. |
85 | 85 |
|
86 | 86 |
\code |
87 | 87 |
ALL_UPPER_CASE_WITH_UNDERSCORES |
88 | 88 |
\endcode |
89 | 89 |
|
90 | 90 |
\subsection cs-loc-var Class and instance member variables, auto variables |
91 | 91 |
|
92 | 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 | 94 |
\code |
95 | 95 |
all_lower_case_with_underscores |
96 | 96 |
\endcode |
97 | 97 |
|
98 |
\subsection pri-loc-var Private member variables |
|
99 |
|
|
100 |
Private member variables should start with underscore |
|
101 |
|
|
102 |
\code |
|
103 |
_start_with_underscores |
|
104 |
\endcode |
|
105 |
|
|
98 | 106 |
\subsection cs-excep Exceptions |
99 | 107 |
|
100 | 108 |
When writing exceptions please comply the following naming conventions. |
101 | 109 |
|
102 | 110 |
\code |
103 | 111 |
ClassNameEndsWithException |
104 | 112 |
\endcode |
105 | 113 |
|
106 | 114 |
or |
107 | 115 |
|
108 | 116 |
\code |
109 | 117 |
ClassNameEndsWithError |
110 | 118 |
\endcode |
111 | 119 |
|
112 | 120 |
\section header-template Template Header File |
113 | 121 |
|
114 | 122 |
Each LEMON header file should look like this: |
115 | 123 |
|
116 | 124 |
\include template.h |
117 | 125 |
|
118 | 126 |
*/ |
... | ... |
@@ -507,79 +507,79 @@ |
507 | 507 |
/** |
508 | 508 |
@defgroup eps_io Postscript exporting |
509 | 509 |
@ingroup io_group |
510 | 510 |
\brief General \c EPS drawer and graph exporter |
511 | 511 |
|
512 | 512 |
This group contains general \c EPS drawing methods and special |
513 | 513 |
graph exporting tools. |
514 | 514 |
*/ |
515 | 515 |
|
516 | 516 |
|
517 | 517 |
/** |
518 | 518 |
@defgroup concept Concepts |
519 | 519 |
\brief Skeleton classes and concept checking classes |
520 | 520 |
|
521 | 521 |
This group describes the data/algorithm skeletons and concept checking |
522 | 522 |
classes implemented in LEMON. |
523 | 523 |
|
524 | 524 |
The purpose of the classes in this group is fourfold. |
525 | 525 |
|
526 | 526 |
- These classes contain the documentations of the concepts. In order |
527 | 527 |
to avoid document multiplications, an implementation of a concept |
528 | 528 |
simply refers to the corresponding concept class. |
529 | 529 |
|
530 | 530 |
- These classes declare every functions, <tt>typedef</tt>s etc. an |
531 | 531 |
implementation of the concepts should provide, however completely |
532 | 532 |
without implementations and real data structures behind the |
533 | 533 |
interface. On the other hand they should provide nothing else. All |
534 | 534 |
the algorithms working on a data structure meeting a certain concept |
535 | 535 |
should compile with these classes. (Though it will not run properly, |
536 | 536 |
of course.) In this way it is easily to check if an algorithm |
537 | 537 |
doesn't use any extra feature of a certain implementation. |
538 | 538 |
|
539 | 539 |
- The concept descriptor classes also provide a <em>checker class</em> |
540 | 540 |
that makes it possible check whether a certain implementation of a |
541 | 541 |
concept indeed provides all the required features. |
542 | 542 |
|
543 | 543 |
- Finally, They can serve as a skeleton of a new implementation of a concept. |
544 | 544 |
|
545 | 545 |
*/ |
546 | 546 |
|
547 | 547 |
|
548 | 548 |
/** |
549 | 549 |
@defgroup graph_concepts Graph Structure Concepts |
550 | 550 |
@ingroup concept |
551 | 551 |
\brief Skeleton and concept checking classes for graph structures |
552 | 552 |
|
553 | 553 |
This group contains the skeletons and concept checking classes of LEMON's |
554 | 554 |
graph structures and helper classes used to implement these. |
555 | 555 |
*/ |
556 | 556 |
|
557 | 557 |
/* --- Unused group |
558 | 558 |
@defgroup experimental Experimental Structures and Algorithms |
559 | 559 |
This group contains some Experimental structures and algorithms. |
560 | 560 |
The stuff here is subject to change. |
561 | 561 |
*/ |
562 | 562 |
|
563 | 563 |
/** |
564 | 564 |
\anchor demoprograms |
565 | 565 |
|
566 | 566 |
@defgroup demos Demo programs |
567 | 567 |
|
568 | 568 |
Some demo programs are listed here. Their full source codes can be found in |
569 | 569 |
the \c demo subdirectory of the source tree. |
570 | 570 |
|
571 |
The standard compilation procedure (<tt>./configure;make</tt>) will compile |
|
572 |
them, as well. |
|
571 |
It order to compile them, use <tt>--enable-demo</tt> configure option when |
|
572 |
build the library. |
|
573 | 573 |
|
574 | 574 |
*/ |
575 | 575 |
|
576 | 576 |
/** |
577 | 577 |
@defgroup tools Standalone utility applications |
578 | 578 |
|
579 | 579 |
Some utility applications are listed here. |
580 | 580 |
|
581 | 581 |
The standard compilation procedure (<tt>./configure;make</tt>) will compile |
582 | 582 |
them, as well. |
583 | 583 |
|
584 | 584 |
*/ |
585 | 585 |
|
0 comments (0 inline)