]> Creatis software - bbtk.git/blob - kernel/doc/bbtkDevelopersGuide/naming_conventions.txt
Feature #1774
[bbtk.git] / kernel / doc / bbtkDevelopersGuide / naming_conventions.txt
1  # ---------------------------------------------------------------------
2  #
3  # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4  #                        pour la Santé)
5  # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6  # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7  # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8  #
9  #  This software is governed by the CeCILL-B license under French law and
10  #  abiding by the rules of distribution of free software. You can  use,
11  #  modify and/ or redistribute the software under the terms of the CeCILL-B
12  #  license as circulated by CEA, CNRS and INRIA at the following URL
13  #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14  #  or in the file LICENSE.txt.
15  #
16  #  As a counterpart to the access to the source code and  rights to copy,
17  #  modify and redistribute granted by the license, users are provided only
18  #  with a limited warranty  and the software's author,  the holder of the
19  #  economic rights,  and the successive licensors  have only  limited
20  #  liability.
21  #
22  #  The fact that you are presently reading this means that you have had
23  #  knowledge of the CeCILL-B license and that you accept its terms.
24  # ------------------------------------------------------------------------ */
25
26
27 * cmake : PACKAGE_NAME : std, itk, vtk
28 (nom bbi ; utilisé par load)
29
30 * librairie créée : bbstd.dll / libbbstd.so, etc. 
31   bb<PACKAGE_NAME>.dll / libbb<PACKAGE_NAME>.so
32
33 * Sources :
34   Type de boite appelé BOX_TYPE_NAME (i.e. dans bbi "new BOX_TYPE_NAME a")
35   - bb<PACKAGE_NAME><BOX_TYPE_NAME>.h / .cxx / .xml
36   Ex : bbstdCast.h
37
38   dans bb<PACKAGE_NAME><BOX_TYPE_NAME>.h :
39   * Symbole de blockage : __bb<PACKAGE_NAME><BOX_TYPE_NAME>_h_INCLUDED__
40   ex : #ifndef __bbstdCast_h_INCLUDED__
41        #define __bbstdCast_h_INCLUDED__
42        ...
43        #endif // __bbstdCast_h_INCLUDED__
44
45
46   * Namespace : bb<PACKAGE_NAME>
47   ex : 
48         namespace bbstd 
49         {
50         ...
51         } // namespace bbstd
52
53   * Classe <BOX_TYPE_NAME>
54   ex : 
55         class Cast : public bbtk::UserBlackBox
56         {
57         }; // class Cast
58   * Descriptor :
59     BEGIN_DESCRIBE_BLACK_BOX(<BOX_TYPE_NAME>,parent)
60     ...
61     BBTK_NAME(<BOX_TYPE_NAME>)
62     ...
63     END_DESCRIBE_BLACK_BOX(<BOX_TYPE_NAME>,parent)
64
65  * Utilisation : si on a la boite B definie dans package P1 et dans package P2 
66   * Utilisation c++ :
67     #include "bbstdCast.h"
68     #include "bbP1B.h"
69     #include "bbP2B.h"
70     main() 
71     {
72         bbtk::BlackBox* b = new bbstd::Cast("b");
73         bbtk::BlackBox* c = new bbP1::B("c");
74         bbtk::BlackBox* d = new bbP2::B("d");
75     }
76
77   * Utilisation bbi :
78     >load std
79     >load P1
80     >load P2
81     >new Cast b 
82     >new B c
83     ERROR : A black box of type B exists in packages P1 and P2. Do you mean P1::B or P2::B ?
84     >new P1::B c
85     >new P2::B d
86     // THIS IS OK
87     >help P1
88     Package P1 v1.0.0 - foo.bar at corp.com
89     My marvelous package
90     Black boxes :
91       B : Uncompress a file in jpeg format
92     >help P2
93     Package P2 v1.0.0 - bar.foo at expat.co
94     I made this package for fun
95     Black boxes :
96       B : Automatic scientific article generator
97     >help B
98     ERROR : A black box of type B exists in packages P1 and P2. Do you mean P1::B or P2::B ?
99     >help P1::B
100     Black box <P1::B>
101     Uncompress a file in jpeg format
102     By : foo.bar at corp.com
103     * Inputs :
104     ...
105
106
107