Coding Style Guide

EEROS is written primarily in C++, and its developers follow the Google C++ Style Guide with some modifications:

#define Guards

We use define guards with a naming similar to Java package names.

For example, lets look at the class Block using the following source files:

In Java the class Block would be located in the package org.eeros.control. Considering this our define guard in the header file looks like this:

#ifndef ORG_EEROS_CONTROL_BLOCK_HPP_
#define ORG_EEROS_CONTROL_BLOCK_HPP_
 
...
 
#endif  // ORG_EEROS_CONTROL_BLOCK_HPP_

File Names and Extensions

Variable Names

General guidelines for variable names are as follows:

Examples:

tableName    -> OK
tablename    -> OK, but tableName is better
table_name   -> Wrong
_tableName   -> Wrong
m_tableName  -> Wrong
tableName_   -> Wrong

Code Documentation