doc/coding_style.dox
changeset 610 4ce8c695e748
parent 509 2784b804abb3
child 614 75cf1d52eee5
equal deleted inserted replaced
1:8ae42df39895 2:d3edd44514db
     1 /*!
     1 /*!
     2 
     2 
     3 \page coding_style Hugo Coding Style 
     3 \page coding_style Hugo Coding Style 
     4 
     4 
     5 \todo More detailed description, an introductory paragraph, etc.
     5 \section Naming Conventions
     6  
       
     7 \section Naming Convenions
       
     8 
     6 
     9 \subsection Classes
     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. 
       
     8 
       
     9 \subsection Classes and other types
       
    10 
       
    11 The name of a class or any type should look like the following:
    10 
    12 
    11 \code
    13 \code
    12 AllWordsCapitalizedWithoutUnderscores 
    14 AllWordsCapitalizedWithoutUnderscores 
    13 \endcode
    15 \endcode
    14 
    16 
    15 \subsection Methods
    17 \subsection Methods and other functions
       
    18 
       
    19 The name of a function should look like the following:
    16 
    20 
    17 \code
    21 \code
    18 firstWordLowerCaseRestCapitalizedWithoutUnderscores 
    22 firstWordLowerCaseRestCapitalizedWithoutUnderscores 
    19 \endcode
    23 \endcode
    20 
    24 
    21 \subsection Constants
    25 \subsection Constants, Macros
       
    26 
       
    27 The names of constants and macros should look like the following:
    22 
    28 
    23 \code
    29 \code
    24 ALL_UPPER_CASE_WITH_UNDERSCORES 
    30 ALL_UPPER_CASE_WITH_UNDERSCORES 
    25 \endcode
    31 \endcode
    26 
    32 
    27 \subsection %Class and instance member variables
    33 \subsection Class and instance member variables, auto variables 
    28 
    34 
    29 \code
    35 The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following:
    30 all_lower_case_with_underscores 
       
    31 \endcode
       
    32 
       
    33 \subsection Auto variables (=variables used locally in methods)
       
    34 
    36 
    35 \code
    37 \code
    36 all_lower_case_with_underscores 
    38 all_lower_case_with_underscores 
    37 \endcode
    39 \endcode
    38 
    40 
    39 \subsection Exceptions
    41 \subsection Exceptions
    40 
    42 
       
    43 When writing exceptions please comply the following naming conventions:
       
    44 
    41 \code
    45 \code
    42 ClassNameEndsWithException
    46 ClassNameEndsWithException
    43 \endcode
    47 \endcode
    44 
    48 
    45 
    49