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

File: [Pegasus] / pegasus / doc / Attic / conventions.txt (download)
Revision: 1.7, Tue Mar 22 17:39:54 2005 UTC (19 years, 1 month ago) by kumpf
Branch: MAIN
CVS Tags: TASK-PEP362_RestfulService-merged_out_from_trunk, TASK-PEP348_SCMO-merged_out_from_trunk, TASK-PEP317_pullop-merged_out_from_trunk, TASK-PEP317_pullop-merged_in_to_trunk, TASK-PEP311_WSMan-root, TASK-PEP311_WSMan-branch, RELEASE_2_5_0-RC1, HPUX_TEST, HEAD
Changes since 1.6: +0 -0 lines
FILE REMOVED
BUG#: 3041
TITLE: Remove obsolete doc files
DESCRIPTION: Removed obsolete files.  The coding conventions are now documented in PEP 221.

(Preliminary; still need to be modified and voted on).

Development Conventions
=======================

1.  Indent by increments of four (tabsize of 8).

2.  Use "char* x" rather than "char *x".

3.  Put opening brace on a line by itself.

4.  ThisIsAClassName - no underscores.

5.  thisIsAMethodName() - no underscores.

6.  Lines should not span more than 80 columns.

7.  When methods span more than 80 columns, do this:

	void MyClass::myMethod(
	    const char* someReallyLongName,
	    const char* someOtherReallyLongName);

8.  Use const whenever possible.

9.  Use const methods whenever possible.

10. Braces must be aligned with control keyword:

	for(...)
	{
	}

    Not this:

	for (...)
	  {
	  }

11. No spaces after names:

	Not "void f ()" but "void f()".

12. Avoid this:

	callingMyFunction(blah,
		          blah2,
			  blah3);

    Do this:

	callingMyFunction(
	    blah,
	    blah2,
	    blah3);

13. Avoid this:

	int        x;
	float      y;

14. Use 0 and not NULL.

15. Don't commit anything that breaks the build (try a clean slate
    checkout and build).

16. Files should take advantage of case and avoid underscores.
    Files should have the same name as the class (and same case).

17. Separate functions with blank lines.

    class X
    {
    public:

	void f();

	void g();
    };

18. No warnings should be committed.

19. Test big changes on at least Windows and Unix (or Linux)

20. Move SLP out of Common.

21. Changes must work on all platforms. Commits must not break any
    platform.

22. No binaries may be committed to repository.

24. Don't separate return type onto its own line:

    Avoid this:

	int
	f()
	{
	}
	

25. All code must be reachable (built) from master makefile. Otherwise
    it will not be reached when doing mass substitutions, testings of
    builds, and license changes.

26. Prepend '_' to private members (including methods).

27. Use /** */ rather than /// for DOC++.

29. Always write a regression test for everything.

30. Always build and run all regression tests before committing.

31. Be mindful that the tests must run on all supported platforms and
    that a commit may break another platform.

33. Tests must clean up the effect they have on the repository.

34. Avoid use of condiational compilation for obscuring platrform
    differences. Use (or put) routines in appropriate platform files
    or in the System*.cpp files in Common.

--------------------------------------------------------------------------------

34. Use this comment style for DOC++ comments:

    class X
    {
    public:

	/** Creates widgets.
	    @param numWidgets the number of widgets to create.
	    @return true on success.
	*/
	void createWidgets(Uint32 numWidgets);
    };

35. Never use full quotes in includes in header files. Use the angle brackets
    and hence use the fully qualified path.

	#include <Pegasus/MyModule/Erp.h>

    Not

	#include "Erp.h"

34. Explain use of Linkage.h files

35. Don't use ultostr(), use sprintf().

36. main() must return something (for NT).

37. Don't use this construct:

	void f() throw TooBad;

    Not supported on many platforms.

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2