Hacking ======= Coding Style ------------ Indentation/spacing: We indent with tabs. Not spaces. For the rest: just look at the code around you, and copy that :) While 80 character wide terminals are hardly used nowadays we are still restricting lines of code to not be any wider. This prevents deep nesting of constructs. Generally, separate blocks of code or different methods with a single blank line. However, if you need to create code sections, e.g. because two ore more different classes are implemented in a single source file, separate them with three blank lines. === Includes === Order of includes: 1) system includes in alphabetical order, 2) cm-features.hh (only in headers), 3) (only in source files) the corresponding header, 4) project includes in alphabetical order. Do not include private headers in header files if it can be avoided with reasonable effort. That helps to keep dependencies low when exporting interfaces later. Documentation ------------- Source code and interfaces are documented using Doxygen. Usually one short paragraph per method should be enough, except you are doing seriously fancy stuff. Build with --enable-internal-docs to have all documentation included in the doxygen output (written to docs/doxygen/html). Some guidelines: # Each header gets a brief file documentation. # Document namespaces and classes in the header files. # Document methods and functions in the implementation. Auxiliary documentation, like this very file for example, are written in crossmark markup. Do not exceed a line-length of 72 characters.