Coding Style
All points listed below are meant to be suggestions. This is only a draft for discussion. In the end the Guidelines will never be "final" to adapt technological changes like better compilers, source control systems and to get rid of problems that may appear in workflows presented here.
Version 0.3
Source-Code:
General:
- rules found here apply
- Filename-Extensions are
.cppfor code and.hppfor headers - indentation with TAB only or 4 spaces per indent. What to use is decided per project.
- Brackets
{and}always have their own line e.g.:for (int i=0; i<5; i++) { x += i; cout << x; } - Brackets
{and}don't have to be used for single commandlines e.g.:for (int i=0; i<5; i++) x += i; - avoid
#definefor constants and macros (except the#ifdeftrick for header files) - no C style memory functions like
malloc(),free()are allowed to be used - usage of the STL whenever possible
- read the Book of Bjarne Stroustroup... 2 times or more ;)
Documentation:
- LateX, Docbook and Structured Text only
- Documentation-Tool Doxygen
+ leads to useful documentation of important functions and classes
+ widely used
crazy XML, but can be transferred to Docbook
ToDo: find or create a XSL sheet for Docbook generation
- language english?
- Date format is always DD.MMM.YYYY where MMM is the full or abbreviated monthname e.g.: 01.Jan.2002 or 18.August.2002 to avoid misinterpretation.
Environment:
- Main Library: Qt 3.x
+ crossplatform Linux, Win and Mac
- gcc 3.2 or higher
+ better c++ compliance (exceptions)
+ faster executables
- Subversion - SVN
+ far superior to CVS
+ uses DAV a standard protocol
+ uses the apache webserver as server
in Alpha stage
Releases:
- primary target
+ Linux x86
- source release-format
+ tar.bz2 (smaller than tar.gz)
+ anonymous SVN access
- binary release-format
+ rpm, deb