]> Creatis software - bbtk.git/blob - kernel/doc/bbtkDevelopersGuide/naming_conventions.txt
f84f404a1c902104fab914dbb1e4685f256f8de1
[bbtk.git] / kernel / doc / bbtkDevelopersGuide / naming_conventions.txt
1 * cmake : PACKAGE_NAME : std, itk, vtk
2 (nom bbi ; utilisé par load)
3
4 * librairie créée : bbstd.dll / libbbstd.so, etc. 
5   bb<PACKAGE_NAME>.dll / libbb<PACKAGE_NAME>.so
6
7 * Sources :
8   Type de boite appelé BOX_TYPE_NAME (i.e. dans bbi "new BOX_TYPE_NAME a")
9   - bb<PACKAGE_NAME><BOX_TYPE_NAME>.h / .cxx / .xml
10   Ex : bbstdCast.h
11
12   dans bb<PACKAGE_NAME><BOX_TYPE_NAME>.h :
13   * Symbole de blockage : __bb<PACKAGE_NAME><BOX_TYPE_NAME>_h_INCLUDED__
14   ex : #ifndef __bbstdCast_h_INCLUDED__
15        #define __bbstdCast_h_INCLUDED__
16        ...
17        #endif // __bbstdCast_h_INCLUDED__
18
19
20   * Namespace : bb<PACKAGE_NAME>
21   ex : 
22         namespace bbstd 
23         {
24         ...
25         } // namespace bbstd
26
27   * Classe <BOX_TYPE_NAME>
28   ex : 
29         class Cast : public bbtk::UserBlackBox
30         {
31         }; // class Cast
32   * Descriptor :
33     BEGIN_DESCRIBE_BLACK_BOX(<BOX_TYPE_NAME>,parent)
34     ...
35     BBTK_NAME(<BOX_TYPE_NAME>)
36     ...
37     END_DESCRIBE_BLACK_BOX(<BOX_TYPE_NAME>,parent)
38
39  * Utilisation : si on a la boite B definie dans package P1 et dans package P2 
40   * Utilisation c++ :
41     #include "bbstdCast.h"
42     #include "bbP1B.h"
43     #include "bbP2B.h"
44     main() 
45     {
46         bbtk::BlackBox* b = new bbstd::Cast("b");
47         bbtk::BlackBox* c = new bbP1::B("c");
48         bbtk::BlackBox* d = new bbP2::B("d");
49     }
50
51   * Utilisation bbi :
52     >load std
53     >load P1
54     >load P2
55     >new Cast b 
56     >new B c
57     ERROR : A black box of type B exists in packages P1 and P2. Do you mean P1::B or P2::B ?
58     >new P1::B c
59     >new P2::B d
60     // THIS IS OK
61     >help P1
62     Package P1 v1.0.0 - foo.bar at corp.com
63     My marvelous package
64     Black boxes :
65       B : Uncompress a file in jpeg format
66     >help P2
67     Package P2 v1.0.0 - bar.foo at expat.co
68     I made this package for fun
69     Black boxes :
70       B : Automatic scientific article generator
71     >help B
72     ERROR : A black box of type B exists in packages P1 and P2. Do you mean P1::B or P2::B ?
73     >help P1::B
74     Black box <P1::B>
75     Uncompress a file in jpeg format
76     By : foo.bar at corp.com
77     * Inputs :
78     ...
79
80
81