doc/coding_style.dox
author marci
Tue, 11 May 2004 14:58:09 +0000
changeset 606 81a0c2f2f7c6
parent 509 2784b804abb3
child 614 75cf1d52eee5
permissions -rw-r--r--
docs
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
athos@603
     9
\subsection 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
athos@603
    17
\subsection 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
athos@603
    25
\subsection 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
athos@603
    33
\subsection 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@507
    41
\subsection 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
*/