]> Creatis software - gdcm.git/blobdiff - Doc/Website/CodingStyle.html
BUG: Newer version of the software on Siemens MR write proper lenght.
[gdcm.git] / Doc / Website / CodingStyle.html
index 938d7499f3fee701a5290f0a524783254d2f4e95..1b0eb06fad83f94b7a94e6027161cd811e7fd997 100644 (file)
    Local variables begin in lowercase. There is more flexibility in the
    naming of local variables although they still should convey some
    semantics.
    Local variables begin in lowercase. There is more flexibility in the
    naming of local variables although they still should convey some
    semantics.
-                                                                                
+ - Naming function parameters:
+   Function parameters begin in lowercase. There is more flexibility in the
+   naming of function parameters although they still should convey some
+   semantics.
+                                                                                 
 * Classes:
  - Don't use the inline keyword when defining an inline function
    within a class definition.
 * Classes:
  - Don't use the inline keyword when defining an inline function
    within a class definition.
       {
          GroupPixel = groupPixel;
       }
       {
          GroupPixel = groupPixel;
       }
+ - Don't use trailing ';' in inline function definition.
+   use :
+   void A::SetGroupPixel( int groupPixel ){GroupPixel = groupPixel;}
+     NOT
+   void A::SetGroupPixel( int groupPixel ){GroupPixel = groupPixel;};
  - Do not repeat the virtual keyword when overriding virtual base methods
    in declaration of subclasses:
      class A
  - Do not repeat the virtual keyword when overriding virtual base methods
    in declaration of subclasses:
      class A
    The Doxygen open-source system is used to generate on-line documentation.
    Doxygen requires the embedding of simple comments in the code which is in
    turn extracted and formatted into documentation. See
    The Doxygen open-source system is used to generate on-line documentation.
    Doxygen requires the embedding of simple comments in the code which is in
    turn extracted and formatted into documentation. See
-      http://www.stack.nl/ dimitri/doxygen/
+      http://www.stack.nl/~dimitri/doxygen/
    for more information about Doxygen.
  - Documenting a class:
    Classes should be documented using the class and brief doxygen commands,
    for more information about Doxygen.
  - Documenting a class:
    Classes should be documented using the class and brief doxygen commands,
          bool Readable = false;
                                                                                 
          /// \brief The number of lines of the image as interpreted from
          bool Readable = false;
                                                                                 
          /// \brief The number of lines of the image as interpreted from
-         /// the various elements encountered at header parsing.
+         ///        the various elements encountered at header parsing.
          int NumberOfLines = -1;
                                                                                 
          /// Predicate implemented as accessor around \ref Readable.
          int NumberOfLines = -1;
                                                                                 
          /// Predicate implemented as accessor around \ref Readable.
    and not
       T* foo = 0;
    nor
    and not
       T* foo = 0;
    nor
-      T * foo;
+      T * foo = 0;
  - Assume T is a given type. When declaring or defining with the
    "reference to T" notation, the & character must be adjacent to
    the variable and not the type. That is use :
  - Assume T is a given type. When declaring or defining with the
    "reference to T" notation, the & character must be adjacent to
    the variable and not the type. That is use :