Development Style Guide
Objective C
- indentation: 4, no tabs
- character encoding: Unicode (UTF-8)
- Line endings: MacOS / Unix (LF)
- doxygen using the @ style
karatasi uses doxygen for code documentation.
Please refer to INSTALL for more instructions how to generate doxygen pages.
Files / Classes
- every file (
*.h, *.m) starts with the karatasi header (copyright etc), followed by a short doxygen description of its purpose using the @file and @brief tags.
- every class has a doxygen description (purpose, responsibilities, collaborations, ...) in the header file just above the
@interface declaration.
Functions / Methods
- all functions have a doxygen documentation in the
*.m file, which describes the contract (interface), not the implementation.
- additionally, they may have a short description in the header file, using
// comments.
- in the doxygen documentation, the first line is a brief description, ended with a dot.
- the next lines may contain any important information.
- all parameters have to be documented using
@param tags
- all return values have to be documented using a
@return tag. Functions returning void have no @return tag.
- exceptions or side effects should be documented
ToDo's
Use the following syntax for ToDo's:
//! @todo user: text