|
From: Hans D. <dul...@eg...> - 2000-09-23 01:12:22
|
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.
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
|