alpar@40: /* -*- C++ -*- alpar@40: * alpar@40: * This file is a part of LEMON, a generic C++ optimization library alpar@40: * alpar@40: * Copyright (C) 2003-2008 alpar@40: * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport alpar@40: * (Egervary Research Group on Combinatorial Optimization, EGRES). alpar@40: * alpar@40: * Permission to use, modify and distribute this software is granted alpar@40: * provided that this copyright notice appears in all copies. For alpar@40: * precise terms see the accompanying LICENSE file. alpar@40: * alpar@40: * This software is provided "AS IS" with no warranty of any kind, alpar@40: * express or implied, and with no claim as to its suitability for any alpar@40: * purpose. alpar@40: * alpar@40: */ alpar@40: alpar@40: /*! alpar@40: alpar@40: \page coding_style LEMON Coding Style alpar@40: alpar@40: \section naming_conv Naming Conventions alpar@40: alpar@40: In order to make development easier we have made some conventions alpar@40: according to coding style. These include names of types, classes, alpar@40: functions, variables, constants and exceptions. If these conventions alpar@40: are met in one's code then it is easier to read and maintain alpar@40: it. Please comply with these conventions if you want to contribute alpar@40: developing LEMON library. alpar@40: alpar@40: \note When the coding style requires the capitalization of an abbreviation, alpar@40: only the first letter should be upper case. alpar@40: alpar@40: \code alpar@40: XmlReader alpar@40: \endcode alpar@40: alpar@40: alpar@40: \warning In some cases we diverge from these rules. alpar@40: This primary done because STL uses different naming convention and alpar@40: in certain cases alpar@40: it is beneficial to provide STL compatible interface. alpar@40: alpar@40: \subsection cs-files File Names alpar@40: alpar@40: The header file names should look like the following. alpar@40: alpar@40: \code alpar@40: header_file.h alpar@40: \endcode alpar@40: alpar@40: Note that all standard LEMON headers are located in the \c lemon subdirectory, alpar@40: so you should include them from C++ source like this: alpar@40: alpar@40: \code alpar@40: #include alpar@40: \endcode alpar@40: alpar@40: The source code files use the same style and they have '.cc' extension. alpar@40: alpar@40: \code alpar@40: source_code.cc alpar@40: \endcode alpar@40: alpar@40: \subsection cs-class Classes and other types alpar@40: alpar@40: The name of a class or any type should look like the following. alpar@40: alpar@40: \code alpar@40: AllWordsCapitalizedWithoutUnderscores alpar@40: \endcode alpar@40: alpar@40: \subsection cs-func Methods and other functions alpar@40: alpar@40: The name of a function should look like the following. alpar@40: alpar@40: \code alpar@40: firstWordLowerCaseRestCapitalizedWithoutUnderscores alpar@40: \endcode alpar@40: alpar@40: \subsection cs-funcs Constants, Macros alpar@40: alpar@40: The names of constants and macros should look like the following. alpar@40: alpar@40: \code alpar@40: ALL_UPPER_CASE_WITH_UNDERSCORES alpar@40: \endcode alpar@40: alpar@40: \subsection cs-loc-var Class and instance member variables, auto variables alpar@40: alpar@40: The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following. alpar@40: alpar@40: \code alpar@40: all_lower_case_with_underscores alpar@40: \endcode alpar@40: alpar@40: \subsection cs-excep Exceptions alpar@40: alpar@40: When writing exceptions please comply the following naming conventions. alpar@40: alpar@40: \code alpar@40: ClassNameEndsWithException alpar@40: \endcode alpar@40: alpar@40: or alpar@40: alpar@40: \code alpar@40: ClassNameEndsWithError alpar@40: \endcode alpar@40: alpar@40: \section header-template Template Header File alpar@40: alpar@40: Each LEMON header file should look like this: alpar@40: alpar@40: \include template.h alpar@40: alpar@40: */