# HG changeset patch # User athos # Date 1084267806 0 # Node ID 86458ad390a7eae2224e8c017318bd75ffa2f8f2 # Parent 580b329c2a0cd1c8d44a744e049e3727fcb6338d I completed the description of the coding style. diff -r 580b329c2a0c -r 86458ad390a7 doc/coding_style.dox --- a/doc/coding_style.dox Mon May 10 16:59:20 2004 +0000 +++ b/doc/coding_style.dox Tue May 11 09:30:06 2004 +0000 @@ -2,35 +2,37 @@ \page coding_style Hugo Coding Style -\todo More detailed description, an introductory paragraph, etc. - -\section Naming Convenions +\section Naming Conventions -\subsection Classes +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. + +\subsection Classes and other types + +The name of a class or any type should look like the following: \code AllWordsCapitalizedWithoutUnderscores \endcode -\subsection Methods +\subsection Methods and other functions + +The name of a function should look like the following: \code firstWordLowerCaseRestCapitalizedWithoutUnderscores \endcode -\subsection Constants +\subsection Constants, Macros + +The names of constants and macros should look like the following: \code ALL_UPPER_CASE_WITH_UNDERSCORES \endcode -\subsection %Class and instance member variables +\subsection Class and instance member variables, auto variables -\code -all_lower_case_with_underscores -\endcode - -\subsection Auto variables (=variables used locally in methods) +The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following: \code all_lower_case_with_underscores @@ -38,6 +40,8 @@ \subsection Exceptions +When writing exceptions please comply the following naming conventions: + \code ClassNameEndsWithException \endcode