doc/coding_style.dox
author hegyi
Sun, 07 Aug 2005 14:17:11 +0000
changeset 1614 350c1d8bb7cc
parent 991 e619a466ca5d
child 1788 614ce2dd3cba
permissions -rw-r--r--
Alpar had the key, focus can be set in the window class. But it is not enough, the focused widget has to be activated, as well! Was a hard task to find out... By the way, two compilation warnings are removed.
     1 /*!
     2 
     3 \page coding_style LEMON Coding Style 
     4 
     5 \section naming_conv Naming Conventions
     6 
     7 In order to make development easier we have made some conventions
     8 according to coding style. These include names of types, classes,
     9 functions, variables, constants and exceptions. If these conventions
    10 are met in one's code then it is easier to read and maintain
    11 it. Please comply with these conventions if you want to contribute
    12 developing LEMON library.
    13 
    14 \warning In some cases we diverge from these rules.
    15 This primary done because STL uses different naming convention and
    16 in certain cases
    17 it is beneficial to provide STL compatible interface.
    18 
    19 \subsection cs-files File Names
    20 
    21 The header file names should look like the following.
    22 
    23 \code
    24 header_file.h
    25 \endcode
    26 
    27 Note that all standard LEMON headers are located in the \c lemon subdirectory,
    28 so you should include them from C++ source like this:
    29 
    30 \code
    31 #include <lemon/header_file.h>
    32 \endcode
    33 
    34 The source code files use the same style and they have '.cc' extension.
    35 
    36 \code
    37 source_code.cc
    38 \endcode
    39 
    40 \subsection cs-class Classes and other types
    41 
    42 The name of a class or any type should look like the following.
    43 
    44 \code
    45 AllWordsCapitalizedWithoutUnderscores 
    46 \endcode
    47 
    48 \subsection cs-func Methods and other functions
    49 
    50 The name of a function should look like the following.
    51 
    52 \code
    53 firstWordLowerCaseRestCapitalizedWithoutUnderscores 
    54 \endcode
    55 
    56 \subsection cs-funcs Constants, Macros
    57 
    58 The names of constants and macros should look like the following.
    59 
    60 \code
    61 ALL_UPPER_CASE_WITH_UNDERSCORES 
    62 \endcode
    63 
    64 \subsection cs-loc-var Class and instance member variables, auto variables 
    65 
    66 The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following.
    67 
    68 \code
    69 all_lower_case_with_underscores 
    70 \endcode
    71 
    72 \subsection cs-excep Exceptions
    73 
    74 When writing exceptions please comply the following naming conventions.
    75 
    76 \code
    77 ClassNameEndsWithException
    78 \endcode
    79 
    80 \section header-template Template Header File
    81 
    82 Each LEMON header file should look like this:
    83 
    84 \include template.h
    85 
    86 */