Code Conventions

From Resound-wiki

Jump to: navigation, search

Doxygen tags will be placed in .h and .hpp files. We use the triple / method for short descriptions and are using ///< for commenting variables. Lots of the source code has been ported from a previous prototype that used a fairly non-standard code conventions so we are in the process of standardising code. The prefference is now to use lower case with underscore for methods and functions camel case for classes and camel case with lower case first letter for variables. All static members are prefixed s_ and other member variables are prefixed m_ so a typical class would look as such.

namespace Resound{
class MyClass{
public:
  MyClass();
  void my_other_method(int withArg1, int andArg2);
private: 
  int m_includingMemberVariable;
  static int s_andStaticVariable;
};
}
Personal tools