From 9eda1fa70c6bdc8f03895a0e140c7df15ddf64b7 Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 24 Feb 2004 18:16:33 +0000 Subject: [PATCH] Notes about Type Names and comments --- docs/StyleGuide.html | 45 ++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/docs/StyleGuide.html b/docs/StyleGuide.html index a8277ea9..199e7fa6 100644 --- a/docs/StyleGuide.html +++ b/docs/StyleGuide.html @@ -1,26 +1,26 @@ - + - - - + H2.old { margin-bottom: 0.21cm } + H2.old { font-family: "Arial", sans-serif; font-size: 14pt; font-style: italic } + P.old { text-indent: 1.01cm; margin-bottom: 0cm; } +-->

VCG Library Coding Guide

Naming Rules

-

Class names with first letter Uppercase and internal +

Class names with first letter Uppercase and internal uppercase to separate compound words.

Function members of classes follow the same rule.

@@ -56,18 +56,20 @@ words.

} -

Class Template Arguments all capitalized and with names +

Class Template Arguments all capitalized and with names remembering where they have been defined.
-TypeDefs used for templated Class arguments just like Class Names, -but ending with “Type”

+Class TypeDefs used for templated Class arguments or for shortness are just like Class Names, +but ending with “Type”, “Iterator”, “Pointer”, or “Container”.

Example:

-   Point3f::ScalarType 
+   typedef typename VertexType::CoordType CoordType;
+   typedef typename VertContainer::iterator VertexIterator;
+ 
 

Header Files

-

Header filenames and folders always fully lower case. Compound names +

Header filenames and folders always fully lower case. Compound names are separated by '_'.

Example:

@@ -80,11 +82,11 @@ are separated by '_'.

disclamier/license intestation and report in the first line of history the $LOG$ cvs string.

-

The following automatically ge\nerated history can be, from time to -time, compressed/shortened.

+

The following automatically generated history can be, from time to +time, compressed and shortened to save space.

Each file of the library has to include all the files that it -requires. A include file should relies on the files included by its +requires. A include file should rely on the files included by its own include files. Example: in vcg/space/box3.h:

@@ -119,5 +121,8 @@ Construct to build an object from different a integral type.

Point3d pd=Point3f::Construct(pf); pf.Import(pd);
+ +

Comment and documenting

+

All the classes, algorithms and functions MUST be documented using Doxygen. Please add a short intro before each class explaining design choices and for non trivial classes give some short usage example. For complex classes try to group similar members under categories. Non trivial algorithms should refer the paper/book where they are explained.

\ No newline at end of file