Introduction

The purpose of this document is a work in progress to decide upon coding standards for the ZynAddSubFX codebase.

The Code

For quickly checking out the current git repository:

git clone git://git.code.sf.net/p/zynaddsubfx/code zynaddsubfx

The master branch contains what will become the next release, while experimental has the more exotic, possibly unstable features not ready yet for the master branch.

You can also browse the code directly with gitweb

The Tools

The tools that are currently standard with ZynAddSubFX:

The Style

In order to keep the code organized and more tidy a uniform style is declared:

Whitespace

The standing convention is four spaces per indentation and NO TABs

Doxygen

Doxygen should be used within the header files to document the classes in ZynAddSubFX. The Java style of comments will be used for documenting classes. ie. :

/**
 *The Function that creates all of those bars
 *
 *This function creates the bars used by the something
 *objects after processing them with the given data.
 *@param name the name of the resulting bar
 *@param time the time before bar's exparation
 *@return An Iron bar with the given name and time
 */
Bar getBar(const string &name,const timeClass &time);

When the documentation is updated, it should be made available online at this location using the Doxyfile provided in the cvs checkout

const

const can be used to clarify if a variable should remain constant for the life of an object. const can also be used in conjunction with `&' to avoid unessecery copying in function

Ordering

Methods should be defined in the same order that they are defined in the header files.

Things To Avoid

Use of C libraries/syntax

The use of C++ libraries and syntax should be prefered over the equivalent for C.

SourceForge Logo