(file) Return to conventions.txt CVS log (file) (dir) Up to [Pegasus] / pegasus / doc

 1 mike  1.1 
 2           Development Conventions
 3           =======================
 4           
 5           1.  Indent by increments of four.
 6           
 7           2.  Use "char* x" rather than "char *x".
 8           
 9           3.  Put opening brace on a line by itself.
10           
11           4.  ThisIsAClassName - no underscores.
12           
13           5.  thisIsAMethodName() - no underscores.
14           
15           6.  Lines should not span more than 80 columns.
16           
17           7.  When methods span more than 80 columns, do this:
18           
19           	void MyClass::myMethod(
20           	    const char* someReallyLongName,
21           	    const char* someOtherReallyLongName);
22 mike  1.1 
23           8.  Use const whenever possible.
24           
25           9.  Use const methods whenever possible.
26           
27           10. Braces must be aligned with control keyword:
28           
29           	for(...)
30           	{
31           	}
32           
33               Not this:
34           
35           	for (...)
36           	  {
37           	  }
38           
39           11. No spaces after names:
40           
41           	Not "void f ()" but "void f()".
42           
43 mike  1.1 12. Avoid this:
44           
45           	callingMyFunction(blah,
46           		          blah2,
47           			  blah3);
48           
49               Do this:
50           
51           	callingMyFunction(
52           	    blah,
53           	    blah2,
54           	    blah3);
55           
56           13. Avoid this:
57           
58           	int        x;
59           	float      y;
60           
61           14. Use 0 and not NULL.
62           
63           15. Don't commit anything that breaks the build (try a clean slate
64 mike  1.1     checkout and build).
65           
66           16. Files should take advantage of case and avoid underscores.
67               Files should have the same name as the class (and same case).
68           
69           17. Separate functions with blank lines.
70           
71               class X
72               {
73               public:
74           
75           	void f();
76           
77           	void g();
78               };
79           
80           18. No warnings should be committed.
81           
82           19. Test big changes on at least Windows and Unix (or Linux)
83           
84           20. Move SLP out of Common.
85 mike  1.1 
86           21. Changes must work on all platforms. Commits must not break any
87               platform.
88           
89           22. No binaries may be committed to repository.

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2