Coding Standard and Style Guide - OttaboticsRobotRacing/MK2 GitHub Wiki
MK2/
src/
include/
modules/
<module name>/
src/
include/
docs/
test/
res/
Makefile
module.mk
README.md
docs/
res/
Makefile
README.md
This directory will only store code for the core module. This will only be maintained by Jimmy.
This directory will only store code for the core module. This will only be maintained by Jimmy.
This directory will contain directories containing the individual modules for MK2. Some examples are: sample, navigation, vision, utility, etc.
This directory will contain source code, ie. .cpp
files, for <module name>
This directory will contain header files, ie. .hpp
files, for <module name>
This directory will contain documentation for <module name>
This directory will contain testing code for <module name>
, i.e. test.cpp
This directory will contain resource files for <module name>
, i.e. sample and test images
Makefile to compile <module name>
separately from the core
Makefile used to include this module when compiling the core
README for <module name>
This directory will contain documentation (generated by Doxygen).
This directory will contain resource files for the core
Makefile used to compile the core
README for the core
Create a new directory for each POC.
POC/
<POC idea 1>/
src/
include/
Makefile
README.md
<POC idea 2>/
<POC idea 3>/
Refer to the Google Style Guide.
Names should be descriptive; avoid abbreviation.
Give as descriptive a name as possible, within reason. Do not worry about saving horizontal space as it is far more important to make your code immediately understandable by a new reader. Do not use abbreviations that are ambiguous or unfamiliar to readers outside your project, and do not abbreviate by deleting letters within a word.
Filenames should be all lowercase and can include dashes (-).
Type names start with a capital letter and have a capital letter for each new word, with no underscores: MyExcitingClass
, MyExcitingEnum
.
The names of variables (including function parameters) and data members are all lowercase, with underscores between words. Data members of classes (but not structs) additionally have trailing underscores. For instance: a_local_variable
, a_struct_data_member
, a_class_data_member_
.
Data members of classes, both static and non-static, are named like ordinary nonmember variables, but with a trailing underscore.