|
From: Frank V. C. <fr...@co...> - 2000-09-23 02:08:11
|
Hans Dulimarta wrote:
>
> Frank, I thought I fixed bug 113984 (header alignments).
> But again I checked the cppstnd.tex and could not find any
> appropriate guidelines.
>
> You wrote the following three lines in the bug report:
>
> [#1] Method comments should left justify with return type in signature.
> [#2] Method signatures should left justify with return types in
> signature.
> [#3] Return types generally align on a four level indentation depth.
What I meant by #3 can be summarized in the header file
MutexSemaphoreGroup.hpp, so in answer to your graphic depiction, yes it
is correct with the exception of the class MyClass opening brace (which
should line up with 'class' on the next line.
Now, this has mostly been my organization and alignment which for me is
readable. How do you feel about it?
>
> My questions:
> Point #1 and #2 were clearly understood.
> Point #3 is a bit unclear: when you mentioned "4-level deep", which
> column is the reference column? I assume it is 4-level deep relative
> to the "class" keyword.
>
> Is the following correctly indented according to the above 'guidelines'?
> (leading blanks were replaced with = or -)
>
> namespace corelinux {
>
> ===class MyClass {
> ===---===---===/**
> ===---===---===---constructors have no return type.
> ===---===---===---I assume the return type is "empty string"
> ===---===---===*/
> ===---===---===MyClass( params );
>
> ===---===---===/// comment for virtual MethodA
> ===---virtual ReturnType MethodA( signature ... );
>
> ===---===---===/// comment for methodB
> ===---===---===void MethodB ( signature ... );
> ===};
> }
>
> I think we should add this "guideline" to the C++ Coding standard.
>
> --
> Hans Dulimarta, Ph.D. dul...@co...
> P: 517-432-7589 http://www.egr.msu.edu/~dulimart
> F: 760-281-7691 http://corelinux.sourceforge.net
> Elec. & Comp. Engg., Mich. State Univ., E. Lansing, MI 48824
> _______________________________________________
> Corelinux-develop mailing list
> Cor...@li...
> http://lists.sourceforge.net/mailman/listinfo/corelinux-develop
--
Frank V. Castellucci
|