Difference between revisions of "Coding Conventions & Style"

From MNE-CPP Wiki
Jump to: navigation, search
Line 23: Line 23:
 
'''Using Doxygen:'''
 
'''Using Doxygen:'''
  
Please use DoxyGen as shown in the TemplateClass [https://raw.githubusercontent.com/mne-tools/mne-cpp/master/tools/coding_conventions/Template_Class/templateclass.h| header] and [https://raw.githubusercontent.com/mne-tools/mne-cpp/master/tools/coding_conventions/Template_Class/templateclass.cpp| source] files. Don't forget to change the documentation header in the header and source file. It should always include the file's and your name (E-Mail adress). Also add the current date and all other necessary descriptions.
+
Please use DoxyGen as shown in the TemplateClass [https://raw.githubusercontent.com/mne-tools/mne-cpp/master/tools/coding_conventions/Template_Class/templateclass.h header] and [https://raw.githubusercontent.com/mne-tools/mne-cpp/master/tools/coding_conventions/Template_Class/templateclass.cpp source] files. Don't forget to change the documentation header in the header and source file. It should always include the file's and your name (E-Mail adress). Also add the current date and all other necessary descriptions.

Revision as of 17:03, 21 January 2016

Template Class Headers and Source files:

Please see the TemplateClass header and source files in mne-cpp/tools/coding_conventions/Template_Class for an example how to structure your classes.

Naming Conventions:

Object Rule
Namespace MYNAMESPACE
Classes MyClass
Member functions myFunction
Member variables m_typeMeaningfulName

Readability and Understandability:

  • Avoid complex and condensed expressions
  • use meaningful variable names

Using Doxygen:

Please use DoxyGen as shown in the TemplateClass header and source files. Don't forget to change the documentation header in the header and source file. It should always include the file's and your name (E-Mail adress). Also add the current date and all other necessary descriptions.