RMAG Machine Coding Standards
Naming
Variables, method names, and function names will use camleCase naming convention. Private members will be named as m_lolMember. Header guards should be defined as <NAMESPACE>_<CLASS>_H. i.e ROFLCLASS_H. Hungarian notation should never be used.
Header
Header includes should be in order of the header for the source file, then includes for libraries and frameworks, then includes from within the project.
Pointers (or lack therof)
There shall be no raw pointers in the code. All pointers will be handled via Boost's shared pointers.
Namespaces & Typedefs
No anonymous namespaces allowed, and no using directives. Typedefs should be used sparingly
Indentation and bracket alignment
Indentation will be done through tabs, not spaces. All if/for/while/do blocks should include brackets. Classes should be formatted as the following
class RoflClass
{
public:
omg lol();
private:
int laughs;
};
if(condition) // bad
if ( condition ) // bad
if (condition) // Good
Constructors
Constructors should be used only to set variables required for the class's operation. Further initialization should be in a init() method.
Banned files
There are certain files that are strictly prohibited from being checked into the repository, primarily thumbs.dll on Windows and .DS_Store on Mac. These files serve absolutely no purpose and should be added to .gitignore immediately.