Difference between revisions of "Slicer3:Style"

From NAMIC Wiki
Jump to: navigation, search
 
Line 3: Line 3:
 
* All C++ classes must conform to the style conventions of their parent classes.   
 
* All C++ classes must conform to the style conventions of their parent classes.   
 
** In most cases for Slicer Base, this means following VTK coding conventions including naming, indentation, and other issues discussed at the [http://www.vtk.org/Wiki/VTK_Coding_Standards VTK Coding Standards] page.
 
** In most cases for Slicer Base, this means following VTK coding conventions including naming, indentation, and other issues discussed at the [http://www.vtk.org/Wiki/VTK_Coding_Standards VTK Coding Standards] page.
** For command line modules implemented in ITK, follow the conventions defined in Insight/Documentation/Style.pdf from the ITK distribution.
+
** For command line modules implemented in ITK, follow the conventions defined in [[media:Style.pdf | Insight/Documentation/Style.pdf]] from the ITK distribution.
  
 
Highlights of the policies:
 
Highlights of the policies:

Revision as of 19:44, 28 December 2006

Home < Slicer3:Style

A few things to keep in mind:

  • All C++ classes must conform to the style conventions of their parent classes.
    • In most cases for Slicer Base, this means following VTK coding conventions including naming, indentation, and other issues discussed at the VTK Coding Standards page.
    • For command line modules implemented in ITK, follow the conventions defined in Insight/Documentation/Style.pdf from the ITK distribution.

Highlights of the policies:

  • avoid acronyms in class and method names
  • use 2 spaces for indentation, not tabs
  • think carefully about the reusability of your class hierarcies
  • comment your code extensively