summaryrefslogtreecommitdiff
path: root/d
diff options
context:
space:
mode:
authorschodet2004-06-27 11:23:27 +0000
committerschodet2004-06-27 11:23:27 +0000
commit2f764ac0e5047129685ed4f01ffa0aeb30cdd81e (patch)
treef94ff21609ce5d141ca989e0ec02a67c87500db9 /d
parent497ca00ec6e54467b8a69d77d807c4ce0974cd7b (diff)
Initial revision
Diffstat (limited to 'd')
-rw-r--r--d/dev/standards/Makefile10
-rw-r--r--d/dev/standards/coding.txt504
-rw-r--r--d/dev/standards/ni_templates/plugin/template.vimbin0 -> 3371 bytes
-rw-r--r--d/dev/standards/ni_templates/templates/template_gpl.c28
-rw-r--r--d/dev/standards/ni_templates/templates/template_gpl.cpp25
-rw-r--r--d/dev/standards/ni_templates/templates/template_gpl.h30
-rw-r--r--d/dev/standards/ni_templates/templates/template_gpl.hpp27
-rw-r--r--d/dev/standards/ni_templates/templates/template_robot.c29
-rw-r--r--d/dev/standards/ni_templates/templates/template_robot.cpp26
-rw-r--r--d/dev/standards/ni_templates/templates/template_robot.h31
-rw-r--r--d/dev/standards/ni_templates/templates/template_robot.hpp28
11 files changed, 738 insertions, 0 deletions
diff --git a/d/dev/standards/Makefile b/d/dev/standards/Makefile
new file mode 100644
index 0000000..4eb46ad
--- /dev/null
+++ b/d/dev/standards/Makefile
@@ -0,0 +1,10 @@
+DOC = coding.html
+
+doc: $(DOC)
+
+%.html: %.txt
+ aft $<
+ test -r $<-TOC && aft $< || true
+
+clean:
+ rm -f $(DOC) *.txt-TOC *.bak *~
diff --git a/d/dev/standards/coding.txt b/d/dev/standards/coding.txt
new file mode 100644
index 0000000..ac6bd4e
--- /dev/null
+++ b/d/dev/standards/coding.txt
@@ -0,0 +1,504 @@
+*Title: Coding standards Efrei Robotique
+*Author: Ni
+
+*TOC
+
+* Intro
+
+Afin d'assurer un code source homogène, ce document défini les standards de
+codage pour tout programme développé pour Efrei Robotique. Le but n'est pas de
+définir un standard parfait, aucun ne peu prétendre l'être, mais un standard
+homogène.
+
+Il est basé sur les
+[GNU Coding Standards (http://www.gnu.org/prep/standards.html)].
+
+Ce document n'est pas figée, si vous n'êtes pas d'accord avec un point, on
+peut en discuter.
+
+* Code C
+
+** Formatage
+
+L'indentation est de 4 caractères, tout en gardant une tabulation de 8
+caractères. Éviter de faire des lignes de plus de 78 caractères.
+
+Pour les fonctions mettre le nom de la fonction et les accolades en première
+colonne.
+
+Aligner les lignes cassées avec les parenthèses ou les opérateurs.
+
+Les accolades de blocs sont mis sur leur propre ligne et décalées 2
+caractères.
+
+Mettre un espace autour des opérateurs sauf :
+
+ * pour le |--|, le |++| et |->| ;
+ * après les opérateurs d'indirection ;
+ * avant une virgule ;
+ * après une parenthèse ouvrante ou avant une parenthèse fermante.
+
+Les identifiant sont écrits en minuscule, les mots séparés par un caractère
+de soulignement (|_|). La seule exception est les noms de macros écrits en
+majuscules. Un identifiant de type se termine par |_t| (c'est éventuellement
+discutable... mais bon, je trouve que c'est pas mal).
+
+Un exemple pour faire plus clair :
+
+^<<
+static char *
+concat (char *s1, char *s2)
+{
+ int i;
+ if (!s1 || !s2)
+ return 0;
+ for (i = 0; i < 5; i++)
+ {
+ faire_un_truc_complexe (avec_un_long_argument,
+ et_un_autre[4] + 1,
+ toto ());
+ }
+ do
+ {
+ z--;
+ } while (truc ());
+ return 0;
+}
+^>>
+
+Lorsque l'on coupe une expression sur plusieurs lignes essayer de couper avant
+l'opérateur.
+
+Éviter d'utiliser NULL, c'est pour les vieux. Utilisez 0 à la place.
+
+Il n'y a jamais plus de deux espaces à la suite, sauf pour l'indentation. Il
+n'y a pas d'espace en fin de ligne.
+
+On saute une ligne après chaque fonction même la dernière, mais jamais à
+l'intérieur d'une fonction. Si l'envie vous prend de mettre une ligne vide
+dans une fonction, c'est qu'on pourrait certainement la remplacer par un
+commentaire.
+
+Il n'y a jamais deux ligne vides à la suite.
+
+** Commentaires.
+
+Une phrase commence par une majuscule et se termine par un point. En français,
+il y a un espace avant chaque ponctuation composé de deux signes, mais pas
+d'un ou trois signes. En anglais il n'y a pas d'espace devant un caractère de
+ponctuation, mais deux espaces après un point s'il signifie une fin de phrase.
+
+Placez les commentaires sur leur propre ligne rarement en fin de ligne sauf
+éventuellement pour la description d'une structure ou d'une palanquée de
+variables globales (mais si, pour un microcontrôleur, c'est bien).
+
+Les seuls commentaires autorisés en C sont les :
+
+ /* Commentaires. */
+
+On peut utiliser toutefois les commentaires C++ pour commenter temporairement
+du code.
+
+Si le commentaire prend plusieurs lignes le formater de cette manière :
+
+ /* Ceci
+ * est
+ * un long
+ * commentaire. */
+
+Merci de mettre plein de commentaires, mais uniquement s'il apporte
+quelquechose. Par exemple :
+
+^<<
+/* Initialise i (mauvais commentaire). */
+i = 0;
+/* Recherche la fin de la liste (bon commentaire). */
+for (l = debut; l != fin; l = l->next)
+ ;
+^>>
+
+Mettre un commentaire au début de chaque fonction afin d'expliquer à qui elle
+sert. Ne pas répéter dans le commentaire ce qui est déjà dit dans la
+déclaration de la fonction.
+
+Chaque fichier a une structure normalisée.
+
+Pour un en-tête |robert.h| :
+
+^<<
+#ifndef ROBERT_H
+#define ROBERT_H
+/* robert.h - Fonctions de robertisation des paramètres. */
+/* Programme de simulation de merguez. {{{
+ *
+ * Copyright (C) 2004 Nicolas Schodet
+ *
+ * Robot APB Team/Efrei 2005.
+ * Web: http://assos.efrei.fr/robot/
+ * Email: robot AT efrei DOT fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+#include "entete_non_systeme.h"
+
+#include <entete_systeme.h>
+
+{Ici les définitions de types et de structures.}
+
+/* +AutoDec */
+{Ici, les définitions de fonctions insérées automatiquement.}
+/* -AutoDec */
+
+#endif /* ROBERT_H */
+^>>
+
+Pour un code source |robert.c| :
+
+^<<
+/* robert.c - Fonctions de robertisation des paramètres. */
+/* Programme de simulation de merguez. {{{
+ *
+ * Copyright (C) 2004 Nicolas Schodet
+ *
+ * Robot APB Team/Efrei 2005.
+ * Web: http://assos.efrei.fr/robot/
+ * Email: robot AT efrei DOT fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+#include "robert.h"
+#include "entete_non_systeme.h"
+
+#include <entete_systeme.h>
+
+{Ici les définitions de types et de structures locales au fichier.}
+
+/* +AutoDec */
+{Ici, les définitions de fonctions statiques insérées automatiquement.}
+/* -AutoDec */
+
+{Ici, les définitions de variables statiques ou globales.}
+
+{Ici, les définitions des fonctions.}
+^>>
+
+Cette documentation est fournie avec les fichiers de template et le script qui
+va avec pour Vim.
+
+** Extractdoc
+
+Pour les petits programmes en C, |extractdoc| permet d'extraire la doc des codes
+sources. Il utilise le même style de commentaires que doxygen, c'est à dire :
+
+ /** Ceci est un commentaire extractdoc. */
+
+Il n'utilise par contre pas les balises doxygen, je trouve qu'elles nuisent à
+la lecture du commentaire. Il reconnaît par contre la syntaxe
+[aft (http://www.maplefish.com/todd/aft-refman.html)], si aft est utilisé pour
+transformer le texte. En pratique, il remplace un espace en début de
+commentaire par une tabulation et fait aussi le remplacement de liste de
+description. Par exemple :
+
+^<<
+/**
+ * Met à jour les informations de cuisson.
+ *
+ * - t : température (°C).
+ * - mode : type de cuisson.
+ */
+^>>
+
+donne :
+
+^<<
+Met à jour les informations de cuisson.
+
+ [t] température (°C).
+ [mode] type de cuisson.
+^>>
+
+et dans aft :
+
+Met à jour les informations de cuisson.
+
+ [t] température (°C).
+ [mode] type de cuisson.
+
+** Trucs et astuces
+
+Évitez d'utiliser des unsigned long ou des short, on ne devrais utiliser que :
+
+ [des int] pour les entiers, même s'il sont toujours positifs ;
+ [des double] pour les flottants ;
+ [des char] pour des caractères ;
+ [des unsigned char] pour des données binaires.
+
+* Code C++
+
+** Formatage
+
+Les règles du formatage du code C s'appliquent.
+
+Vim ne gère pas encore correctement l'indentation de certain aspects du C++, notamment :
+
+ * les namespaces ;
+ * les listes d'initialisations.
+
+Pour les namespaces, n'indentez pas le contenu, c'est inutile d'indenter un
+fichier complet. Fermez toujours un namespace avec un commentaire rapellant le
+nom du namespace.
+
+Pour les listes d'initialisation, on les formate de cette manière :
+
+^<<
+/// Constructeur par défaut.
+Merguez::Merguez (void)
+ : temperatureDeCuisson_ (0), identificateur_tres_long_ (42),
+ un_autre_encore_ (51), fermete_ (0.0)
+{
+}
+^>>
+
+Les identificateurs sont écrit en minuscule. Les mots sont séparés par une
+majuscule. Les noms de types commencent par une majuscule. Les noms de
+variables membres privées ou protégées se terminent par un caractère de
+soulignement (|_|).
+
+Un petit exemple :
+
+^<<
+namespace bbq
+{
+
+/// Classe de définition des propriétés d'une merguez.
+class Merguez
+{
+ int temperatureDeCuisson_;
+ double fermete_;
+ public:
+ /// Constructeur par défaut.
+ Merguez (void);
+};
+
+} // bbq
+^>>
+
+L'ordre des déclarations dans la classe est le suivant (avec variations
+possibles) :
+
+ * types ;
+ * variables membres ;
+ * constructeurs ;
+ * constructeur de recopie, destructeur et operateur= ;
+ * fonctions publiques ;
+ * fonctions privées ou protégées.
+
+Si les constructeurs ou destructeurs sont privées, ils n'occupent plus la
+position de tête de classe. Les définitions dans le fichier |.cc| suivent le
+même ordre que la déclaration.
+
+Les classes sont déclarées dans un fichier |.h| de la forme :
+
+^<<
+#ifndef MERGUEZ_H
+#define MERGUEZ_H
+// merguez.h - Composant Merguez.
+// Programme de barbeq. {{{
+//
+// Copyright (C) 2004 Nicolas Schodet
+//
+// Robot APB Team/Efrei 2005.
+// Web: http://assos.efrei.fr/robot/
+// Email: robot AT efrei DOT fr
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// }}}
+#include "entete_non_systeme.h"
+
+#include <entete_systeme.h>
+
+{Ici la définition de classe.}
+
+{Ici la déclaration de fonctions globales.}
+
+{Ici la définition de fonctions inlines.}
+
+#endif // MERGUEZ_H
+^>>
+
+Les classes sont implémentées dans un fichier |.cc| de la forme :
+
+^<<
+// merguez.cc - Composant Merguez.
+// Programme de barbeq. {{{
+//
+// Copyright (C) 2004 Nicolas Schodet
+//
+// Robot APB Team/Efrei 2005.
+// Web: http://assos.efrei.fr/robot/
+// Email: robot AT efrei DOT fr
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// }}}
+#include "merguez.h"
+#include "entete_non_systeme.h"
+
+#include <entete_systeme.h>
+
+{Ici les définitions de types et de structures locales au fichier.}
+
+{Ici, les définitions de fonctions statiques.}
+
+{Ici, les définitions de variables statiques ou globales.}
+
+{Ici, les définitions des fonctions.}
+^>>
+
+Les noms de fichiers ne prennent jamais de majuscule.
+
+** Commentaires.
+
+Le seul type de commentaire à utiliser est le commentaire C++. On peut
+toutefois utiliser le commentaire C pour désactiver temporairement du code.
+
+La documentation du code se fait avec doxygen. On utilise les trois barres
+obliques pour signifier à doxygen que ce commentaire doit être lu. On essayera
+toutefois d'éviter les balises doxygen qui réduisent la lisibilité du
+commentaire.
+
+Une exception à la règle des commentaires bidons s'applique aux constructeurs
+et destructeurs afin que chaque fonction ait son commentaire attitré.
+
+** Trucs et astuces
+
+Dans une classe qui ne peut être copiée, on peut déclarer le constructeur de
+recopie et l'opérateur = comme fonction privées. Ce n'est alors pas la peine
+de les définir.
+
+Une variable de boucle peut être déclarée dans la définition de la boucle.
+
+N'oubliez pas les |std::| pour accéder à une classe de la bibliothèque
+standard.
+
+Déclarer comme fonction const toute fonction qui peut l'être si le sens le
+justifie. De même déclarer les paramètres par pointeur ou référence const si
+possible. Dans le cas de conteneurs const, utiliser des |const_iterator|,
+sinon, ça ne compile pas.
+
+Réutilisez le code existant et faîtes du code réutilisable.
+
+Initialisez toutes les variables membres à un état connu.
+
+Usez et abuser des conteneurs standards comme les |std::list|, |std::vector|,
+|std::map|, mais encore et surtout les |std::string|.
+
+* Outils
+
+** Vim
+
+Voici les options pour vim à inclure dans le |.vimrc| :
+
+^<<
+" Les .h c'est du C, si vous faites du C.
+" let c_syntax_for_h = 1
+
+" Options de formatage
+set cinoptions={.5s:.5sg.5sh.5st0(0=.5s
+
+function! s:C_options()
+ setlocal cindent
+ let g:c_syntax_for_h = 1
+ setlocal formatoptions+=rt
+ setlocal shortmess-=T
+ setlocal shiftwidth=4
+endfunction
+
+function! s:CPP_options()
+ call s:C_options()
+ let g:c_syntax_for_h = 0
+ set fo-=o fo-=r
+ set com-=:// com+=:///,://
+endfunction
+
+au FileType c call s:C_options()
+au FileType cpp call s:CPP_options()
+
+" Corrige un problème lors de la compilation dans plusieurs répertoire.
+set errorformat=%*[^\"]\"%f\"%*\\D%l:\ %m,\"%f\"%*\\D%l:\ %m,%-G%f:%l:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,%-G%f:%l:\ for\ each\ function\ it\ appears\ in.),%f:%l:%m,\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,%D%*\\a:\ Entering\ directory\ `%f',%X%*\\a:\ Leaving\ directory\ `%f',%DMaking\ %*\\a\ in\ %f
+^>>
+
+** Générateur de templates pour Vim
+
+Le répertoire ni_templates contient tout ce qu'il faut pour faire fonctionner
+les templates. Il suffit de copier son contenu dans votre répertoire |.vim| et
+d'ajouter au |.vimrc| :
+
+^<<
+let template_variant = "robot"
+
+" Crée un nouveau fichier C/C++.
+function! F_template()
+ if &filetype == "c" && expand ("%") =~ ".h$"
+ Template h
+ elseif &filetype == "cpp" && (expand ("%") =~ ".h$" || expand ("%") =~ ".hh$" || expand ("%") =~ ".H$" || expand ("%") =~ ".hpp")
+ Template hpp
+ else
+ Template
+ endif
+endfunction
+
+au BufNewFile *.c,*.cc,*.h,*.hh,*.hpp,*.C,*.cxx call F_template()
+^>>
+
diff --git a/d/dev/standards/ni_templates/plugin/template.vim b/d/dev/standards/ni_templates/plugin/template.vim
new file mode 100644
index 0000000..ccd35ef
--- /dev/null
+++ b/d/dev/standards/ni_templates/plugin/template.vim
Binary files differ
diff --git a/d/dev/standards/ni_templates/templates/template_gpl.c b/d/dev/standards/ni_templates/templates/template_gpl.c
new file mode 100644
index 0000000..a86d1b5
--- /dev/null
+++ b/d/dev/standards/ni_templates/templates/template_gpl.c
@@ -0,0 +1,28 @@
+/* @FILE@ */
+/* @=Get_readme()@ {{{
+ *
+ * Copyright (C) @YEAR@ @AUTHOR@
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Contact :
+ * Web: @WEB@
+ * Email: <@EMAIL@>
+ * }}} */
+#include "@FILEBASE@.h"
+
+/* +AutoDec */
+/* -AutoDec */
+
diff --git a/d/dev/standards/ni_templates/templates/template_gpl.cpp b/d/dev/standards/ni_templates/templates/template_gpl.cpp
new file mode 100644
index 0000000..f602829
--- /dev/null
+++ b/d/dev/standards/ni_templates/templates/template_gpl.cpp
@@ -0,0 +1,25 @@
+// @FILE@
+// @=Get_readme()@ {{{
+//
+// Copyright (C) @YEAR@ @AUTHOR@
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// Contact :
+// Web: @WEB@
+// Email: <@EMAIL@>
+// }}}
+#include "@FILEBASE@.h"
+
diff --git a/d/dev/standards/ni_templates/templates/template_gpl.h b/d/dev/standards/ni_templates/templates/template_gpl.h
new file mode 100644
index 0000000..f31eccd
--- /dev/null
+++ b/d/dev/standards/ni_templates/templates/template_gpl.h
@@ -0,0 +1,30 @@
+#ifndef @FILEDEF@
+#define @FILEDEF@
+/* @FILE@ */
+/* @=Get_readme()@ {{{
+ *
+ * Copyright (C) @YEAR@ @AUTHOR@
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Contact :
+ * Web: @WEB@
+ * Email: <@EMAIL@>
+ * }}} */
+
+/* +AutoDec */
+/* -AutoDec */
+
+#endif /* @FILEDEF@ */
diff --git a/d/dev/standards/ni_templates/templates/template_gpl.hpp b/d/dev/standards/ni_templates/templates/template_gpl.hpp
new file mode 100644
index 0000000..db6a776
--- /dev/null
+++ b/d/dev/standards/ni_templates/templates/template_gpl.hpp
@@ -0,0 +1,27 @@
+#ifndef @FILEDEF@
+#define @FILEDEF@
+// @FILE@
+// @=Get_readme()@ {{{
+//
+// Copyright (C) @YEAR@ @AUTHOR@
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// Contact :
+// Web: @WEB@
+// Email: <@EMAIL@>
+// }}}
+
+#endif // @FILEDEF@
diff --git a/d/dev/standards/ni_templates/templates/template_robot.c b/d/dev/standards/ni_templates/templates/template_robot.c
new file mode 100644
index 0000000..f52e7d7
--- /dev/null
+++ b/d/dev/standards/ni_templates/templates/template_robot.c
@@ -0,0 +1,29 @@
+/* @FILE@ */
+/* @=Get_readme()@ {{{
+ *
+ * Copyright (C) @YEAR@ @AUTHOR@
+ *
+ * Robot APB Team/Efrei 2005.
+ * Web: http://assos.efrei.fr/robot/
+ * Email: robot AT efrei DOT fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+#include "@FILEBASE@.h"
+
+/* +AutoDec */
+/* -AutoDec */
+
diff --git a/d/dev/standards/ni_templates/templates/template_robot.cpp b/d/dev/standards/ni_templates/templates/template_robot.cpp
new file mode 100644
index 0000000..a777070
--- /dev/null
+++ b/d/dev/standards/ni_templates/templates/template_robot.cpp
@@ -0,0 +1,26 @@
+// @FILE@
+// @=Get_readme()@ {{{
+//
+// Copyright (C) @YEAR@ @AUTHOR@
+//
+// Robot APB Team/Efrei 2005.
+// Web: http://assos.efrei.fr/robot/
+// Email: robot AT efrei DOT fr
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// }}}
+#include "@FILEBASE@.h"
+
diff --git a/d/dev/standards/ni_templates/templates/template_robot.h b/d/dev/standards/ni_templates/templates/template_robot.h
new file mode 100644
index 0000000..0401cb0
--- /dev/null
+++ b/d/dev/standards/ni_templates/templates/template_robot.h
@@ -0,0 +1,31 @@
+#ifndef @FILEDEF@
+#define @FILEDEF@
+/* @FILE@ */
+/* @=Get_readme()@ {{{
+ *
+ * Copyright (C) @YEAR@ @AUTHOR@
+ *
+ * Robot APB Team/Efrei 2005.
+ * Web: http://assos.efrei.fr/robot/
+ * Email: robot AT efrei DOT fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+
+/* +AutoDec */
+/* -AutoDec */
+
+#endif /* @FILEDEF@ */
diff --git a/d/dev/standards/ni_templates/templates/template_robot.hpp b/d/dev/standards/ni_templates/templates/template_robot.hpp
new file mode 100644
index 0000000..691da0b
--- /dev/null
+++ b/d/dev/standards/ni_templates/templates/template_robot.hpp
@@ -0,0 +1,28 @@
+#ifndef @FILEDEF@
+#define @FILEDEF@
+// @FILE@
+// @=Get_readme()@ {{{
+//
+// Copyright (C) @YEAR@ @AUTHOR@
+//
+// Robot APB Team/Efrei 2005.
+// Web: http://assos.efrei.fr/robot/
+// Email: robot AT efrei DOT fr
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// }}}
+
+#endif // @FILEDEF@