doc/coding_style.dox
author marci
Wed, 12 May 2004 13:19:32 +0000
changeset 621 2db02d4a9e6e
parent 603 86458ad390a7
child 628 a3a53d7cedc2
permissions -rw-r--r--
BidirGraphWrapper<Graph> bug volt
alpar@507
     1
/*!
alpar@507
     2
alpar@509
     3
\page coding_style Hugo Coding Style 
alpar@507
     4
athos@603
     5
\section Naming Conventions
alpar@507
     6
athos@603
     7
In order to make development easier we have made some conventions according to coding style. These include names of types, classes, functions, variables, constants and exceptions. If these conventions are met in one's code then it is easier to read and maintain it. Please comply with these conventions if you want to contribute developing Hugo library. 
athos@603
     8
alpar@614
     9
\subsection cs-class Classes and other types
athos@603
    10
athos@603
    11
The name of a class or any type should look like the following:
alpar@507
    12
alpar@507
    13
\code
alpar@507
    14
AllWordsCapitalizedWithoutUnderscores 
alpar@507
    15
\endcode
alpar@507
    16
alpar@614
    17
\subsection cs-func Methods and other functions
athos@603
    18
athos@603
    19
The name of a function should look like the following:
alpar@507
    20
alpar@507
    21
\code
alpar@507
    22
firstWordLowerCaseRestCapitalizedWithoutUnderscores 
alpar@507
    23
\endcode
alpar@507
    24
alpar@614
    25
\subsection cs-funcs Constants, Macros
athos@603
    26
athos@603
    27
The names of constants and macros should look like the following:
alpar@507
    28
alpar@507
    29
\code
alpar@507
    30
ALL_UPPER_CASE_WITH_UNDERSCORES 
alpar@507
    31
\endcode
alpar@507
    32
alpar@614
    33
\subsection cs-loc-var Class and instance member variables, auto variables 
alpar@507
    34
athos@603
    35
The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following:
alpar@507
    36
alpar@507
    37
\code
alpar@507
    38
all_lower_case_with_underscores 
alpar@507
    39
\endcode
alpar@507
    40
alpar@614
    41
\subsection cs-excep Exceptions
alpar@507
    42
athos@603
    43
When writing exceptions please comply the following naming conventions:
athos@603
    44
alpar@507
    45
\code
alpar@507
    46
ClassNameEndsWithException
alpar@507
    47
\endcode
alpar@507
    48
alpar@507
    49
alpar@507
    50
*/