r3909 - in trunk: . docs
- From: stw svn gnome org
- To: svn-commits-list gnome org
- Subject: r3909 - in trunk: . docs
- Date: Wed, 27 Sep 2006 07:40:41 -0400 (EDT)
Author: stw
Date: 2006-09-27 07:40:38 -0400 (Wed, 27 Sep 2006)
New Revision: 3909
Modified:
trunk/ChangeLog
trunk/docs/coding-style.doxi
Log:
Wed Sep 27 13:38:39 2006 Stefan Westerfeld <stefan space twc de>
* docs/coding-style.doxi: Added rule that data members in classes are
declared before functions.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-09-27 11:19:01 UTC (rev 3908)
+++ trunk/ChangeLog 2006-09-27 11:40:38 UTC (rev 3909)
@@ -1,3 +1,8 @@
+Wed Sep 27 13:38:39 2006 Stefan Westerfeld <stefan space twc de>
+
+ * docs/coding-style.doxi: Added rule that data members in classes are
+ declared before functions.
+
Wed Sep 27 11:30:27 2006 Stefan Westerfeld <stefan space twc de>
* slowtests/Makefile.am:
Modified: trunk/docs/coding-style.doxi
===================================================================
--- trunk/docs/coding-style.doxi 2006-09-27 11:19:01 UTC (rev 3908)
+++ trunk/docs/coding-style.doxi 2006-09-27 11:40:38 UTC (rev 3909)
@@ -148,6 +148,35 @@
whereas the member initializers (or chained parent constructors) are placed on
the next lines.
+ subsection Data members in classes are declared before functions
+
+ emph{Reasons:}
+ itemize
+ item By using this rule, it becomes easier to read the data members a class
+ has, because they are always declared at the beginning of the class.
+ done
+
+ emph{Code Example:}
+ example
+class AudioDistortion
+{
+ double m_amount;
+public:
+ void
+ set_amount (double amount)
+ {
+ m_amount = amount;
+ }
+ void
+ distort_block (vector<float>& block)
+ {
+ [...]
+ }
+ [...]
+};
+ done
+
+
@section Names
@subsection Functions, Methods, Members, Arguments and Local Variables are written as @code{lower_case_underscore_names}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]