- Timestamp:
- Jan 9, 2013, 8:57:11 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CODING_STYLE.txt
r41 r49 18 18 #endif // PACPUS_EXAMPLE_H 19 19 * use C++-style comments (//) 20 * ALWAYS use curly brackets with statements if, for, etc. 21 * use curly brackets {} as follows: 22 * on the same line with: 23 - namespace { 24 - statements if, for, etc. 25 if (cond) { 26 } else if (cond2) { 27 } else { 28 } 29 * on the next line with: 30 - classes 31 - function and method definitions 32 - local scope blocks 33 class A 34 { 35 void fun A; 36 37 struct AB 38 { 39 }; 40 41 void fun A 42 { 43 } 44 }; 20 45 * write Doxygen-style comments as much as possible, put it in the header file if possible, add developer-only comments in source file 21 46 * use Java-style Doxygen comments, i.e. @returns over \returns … … 63 88 int mMemberA; 64 89 }; 90 65 91 } // namespace pacpus 66 92 … … 87 113 { 88 114 int someIntegerVariable; 115 116 if (a) { 117 a(); 118 } else { 119 b(); 120 } 121 122 if (isConditionSatisfied()) { 123 doSomething(); 124 return 0; 125 } 126 return 1; 89 127 }
Note:
See TracChangeset
for help on using the changeset viewer.