Programming guidelines

From Navit's Wiki
Revision as of 19:56, 15 April 2008 by Stefan (talk | contribs) (First draft of programming guidelines)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Comments

  • Comments for the entire file and classes/structs/methods/functions is the minimum requirement. Examples see below.
  • Please comment your code in a significant and reasonable way.
  • A quick description of (complicated) algorithms makes it easier for other developers and helps them to save a lot of time.


Templates

This is an example how you could (should) comment your files and functions. This is what I'm using for my other projects. If you have any suggestions for improvement, please feel free to discuss them with us.

Files

//##############################################################################################################
//#
//# File: can.cpp
//# Description: CAN-Camera Framework :: CAN container class and high level functions
//# Comment: Some code in here is just a quick hack for debugging
//# Authors: Stefan Klumpp <sk@....> (01/2008)
//#
//##############################################################################################################

Classes/Structs/Functions/Methods

//##############################################################################################################
//#
//# Description: Method for processing (converting) raw_data from the CAN microcontroller to human readable values
//# Comment:
//# Authors: Stefan Klumpp <sk@....> (01/2008)
//#
//##############################################################################################################
void CanData::processData(string &raw_data)

Please add yourself to the list of authors, if you make a significant change.