|
From: Malcolm N. <m.n...@wa...> - 2008-10-03 04:56:21
|
On 03/10/2008 02:16, Tony Reina wrote:
> That's a nice start. I'd like to add:
>
> C++ header files end in |.H| and source files end in |.C|pp
Agreed.
>
> Each file should begin with the $Id tag, original author, and license tag
Agreed, I'll go through the current source and add them.
>
> Every include file must contain a mechanism that prevents multiple
> inclusions of the file. For example, the following should follow the
> header information for the |NOX_Abstract_Vector.H| header file.
> #ifndef NOX_ABSTRACT_VECTOR_H
> #define NOX_ABSTRACT_VECTOR_H
>
> /...body of include file goes here.../
>
> #endif
>
Agreed.
>
> If the arguments of a function don't fit into the 80 chars, start a
> new line and align the additional arguments with the first one.
Agreed. I think this might be done with |--indent-preprocessor or
||--max-instatement-indent=# |but 'm not sure. We'll have to do some
experimentation I think.
>
> For if, else, while and similar statements put the brackets on the
> same line as the statement (this makes it easier to see if the IDE has
> a matching braces tool)
You want
if ( /*Something*/ ) { //YES
i++;
j++;
}
Here is the first stumbling block
I much prefer
if ( /*Something*/ ) // Yes!
{
i++;
j++;
}
I much prefer to see the braces, and you can still check if the brace
matcher works. Now let's see. You live in America, I live in the
Netherlands, is there a boat somewhere in the Pacific with a decent bar?
Of course this is trivial and can be achieved by having two astyle
config files, a global one for the svn code, and a local one for the
working copy, we just have to enforce the svn config file before a merge
and cpomit. Your local one can be what you want.
>
> Each public function must have a Doxygen compatible comment in the header
Agreed.
>
> Use true and false instead of TRUE and FALSE.
>
Agreed.
Best regards
Mal
|