rAKA/doc/coding_convention75cf0fe16150master
rAKA/doc/coding_convention
75cf0fe16150master
README
README
#===============================================================================
- @file README
- @author Nicolas Richart <nicolas.richart@epfl.ch>
- @date Thu Aug 5 10:01:52 2010 #
- @section LICENSE #
- <insert license here> #
#===============================================================================
Coding conventions
- Class : capitalized, no separator → MyClass
- Method : 1st word lower case, the other capitalized, no separator → myMethod()
- Variables : lower case, separator _, more than 3 letters except for loop counters → my_variable
- File names : lower case, separator , extension .hh .cc, same name as the class → my_class.hh
- Inline function : outside the class definition in headers in a file called filename_inline_impl.cc and included in the header file
- Documentation comment : Doxygen
Help tools for emacs
- to have doxygen comments you can use the doxymacs-mode to add in the .emacs
- to auto load the mode in c/c++ files
(require 'doxymacs) (add-hook 'c++-mode-hook 'doxymacs-mode) (add-hook 'c-mode-hook 'doxymacs-mode) - in the (custom-set-variables) add this lines to generate the files headers (C-d i)
'(doxymacs-doxygen-style "JavaDoc") '(doxymacs-file-comment-template (quote ("/**" > n " * " (doxymacs-doxygen-command-char) "file " (if (buffer-file-name) (file-name-nondirectory (buffer-file-name)) "") > n " * " (doxymacs-doxygen-command-char) "author " (user-full-name) (doxymacs-user-mail-address) > n " * " (doxymacs-doxygen-command-char) "date " (current-time-string) > n " *" > n " * " (doxymacs-doxygen-command-char) "brief " (p "Brief description of this file: ") > n " *" > n " * " (doxymacs-doxygen-command-char) "section LICENSE" > n " *" > n " * <insert license here>" > n " *" > n " */" > n > n "/* -------------------------------------------------------------------------- */" > n)))
- to auto load the mode in c/c++ files
- for the snippet code you can use yasnippet some specific snippet files for akantu can be found in the *snippet/* directory
(require 'yasnippet) (yas/initialize) (yas/load-directory "~/.emacs.d/yasnippet/snippets")
(add-hook 'c++-mode-hook 'yas/minor-mode-on) (add-hook 'c-mode-hook 'yas/minor-mode-on)
depending on your version of yasnippet the snippet directories are not arranged in the same way c++-mode snippet akantu inout class cc-mode snippet (common to c and c++) once for
c4science · Help