CodingStyle
API documentation is inside the code, rendered with doxygen.
Code formatting is done by astyle.
Choosing a name for a variable or function
When choosing a name for a variable or function, in general prefer a long and descriptive name instead of a short name.
Avoid abbreviated names (for example "rff" instead of "returnFromFunction") unless the abbreviation is very common and obvious. Even if the purpose of the variable is obvious in the code the reader will still wonder what the name means.
In small scopes, it's fine to choose a short variable name based on the type name. Such as 'int i', 'iterator it', 'std::string str', 'CheckFred cf', 'Token tok', etc.
Some people like to use 'p' for pointer variables, this is optional.
Some Conventions
For classes
- (private) members are prefixed by an underscore (
_) for instance_name
see also: DesignDecisions