alpar@507: /*! alpar@507: alpar@921: \page coding_style LEMON Coding Style alpar@507: alpar@811: \section naming_conv Naming Conventions alpar@507: alpar@667: In order to make development easier we have made some conventions alpar@667: according to coding style. These include names of types, classes, alpar@667: functions, variables, constants and exceptions. If these conventions alpar@667: are met in one's code then it is easier to read and maintain alpar@667: it. Please comply with these conventions if you want to contribute alpar@921: developing LEMON library. athos@603: alpar@2157: \note When the coding style requires the capitalization of an abbreviation, alpar@2157: only the first letter should be upper case. alpar@2157: alpar@2157: \code alpar@2157: XmlReader alpar@2157: \endcode alpar@2157: alpar@2157: alpar@955: \warning In some cases we diverge from these rules. alpar@955: This primary done because STL uses different naming convention and alpar@955: in certain cases alpar@955: it is beneficial to provide STL compatible interface. alpar@955: alpar@955: \subsection cs-files File Names alpar@955: alpar@955: The header file names should look like the following. alpar@955: alpar@955: \code alpar@955: header_file.h alpar@955: \endcode alpar@955: alpar@1083: Note that all standard LEMON headers are located in the \c lemon subdirectory, alpar@955: so you should include them from C++ source like this: alpar@955: alpar@955: \code alpar@955: #include alpar@955: \endcode alpar@955: alpar@955: The source code files use the same style and they have '.cc' extension. alpar@955: alpar@955: \code alpar@955: source_code.cc alpar@955: \endcode alpar@955: alpar@614: \subsection cs-class Classes and other types athos@603: alpar@955: The name of a class or any type should look like the following. alpar@507: alpar@507: \code alpar@507: AllWordsCapitalizedWithoutUnderscores alpar@507: \endcode alpar@507: alpar@614: \subsection cs-func Methods and other functions athos@603: alpar@955: The name of a function should look like the following. alpar@507: alpar@507: \code alpar@507: firstWordLowerCaseRestCapitalizedWithoutUnderscores alpar@507: \endcode alpar@507: alpar@614: \subsection cs-funcs Constants, Macros athos@603: alpar@955: The names of constants and macros should look like the following. alpar@507: alpar@507: \code alpar@507: ALL_UPPER_CASE_WITH_UNDERSCORES alpar@507: \endcode alpar@507: alpar@614: \subsection cs-loc-var Class and instance member variables, auto variables alpar@507: alpar@955: The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following. alpar@507: alpar@507: \code alpar@507: all_lower_case_with_underscores alpar@507: \endcode alpar@507: alpar@614: \subsection cs-excep Exceptions alpar@507: alpar@955: When writing exceptions please comply the following naming conventions. athos@603: alpar@507: \code alpar@507: ClassNameEndsWithException alpar@507: \endcode alpar@507: deba@1788: or deba@1788: deba@1788: \code deba@1788: ClassNameEndsWithError deba@1788: \endcode deba@1788: alpar@991: \section header-template Template Header File alpar@991: alpar@1083: Each LEMON header file should look like this: alpar@991: alpar@991: \include template.h alpar@991: alpar@507: */