]> Creatis software - bbtk.git/blobdiff - kernel/doc/bbtkDevelopersGuide/naming_conventions.txt
*** empty log message ***
[bbtk.git] / kernel / doc / bbtkDevelopersGuide / naming_conventions.txt
diff --git a/kernel/doc/bbtkDevelopersGuide/naming_conventions.txt b/kernel/doc/bbtkDevelopersGuide/naming_conventions.txt
new file mode 100644 (file)
index 0000000..f84f404
--- /dev/null
@@ -0,0 +1,81 @@
+* cmake : PACKAGE_NAME : std, itk, vtk
+(nom bbi ; utilisé par load)
+
+* librairie créée : bbstd.dll / libbbstd.so, etc. 
+  bb<PACKAGE_NAME>.dll / libbb<PACKAGE_NAME>.so
+
+* Sources :
+  Type de boite appelé BOX_TYPE_NAME (i.e. dans bbi "new BOX_TYPE_NAME a")
+  - bb<PACKAGE_NAME><BOX_TYPE_NAME>.h / .cxx / .xml
+  Ex : bbstdCast.h
+
+  dans bb<PACKAGE_NAME><BOX_TYPE_NAME>.h :
+  * Symbole de blockage : __bb<PACKAGE_NAME><BOX_TYPE_NAME>_h_INCLUDED__
+  ex : #ifndef __bbstdCast_h_INCLUDED__
+       #define __bbstdCast_h_INCLUDED__
+       ...
+       #endif // __bbstdCast_h_INCLUDED__
+
+
+  * Namespace : bb<PACKAGE_NAME>
+  ex : 
+       namespace bbstd 
+       {
+       ...
+       } // namespace bbstd
+
+  * Classe <BOX_TYPE_NAME>
+  ex : 
+       class Cast : public bbtk::UserBlackBox
+       {
+       }; // class Cast
+  * Descriptor :
+    BEGIN_DESCRIBE_BLACK_BOX(<BOX_TYPE_NAME>,parent)
+    ...
+    BBTK_NAME(<BOX_TYPE_NAME>)
+    ...
+    END_DESCRIBE_BLACK_BOX(<BOX_TYPE_NAME>,parent)
+
+ * Utilisation : si on a la boite B definie dans package P1 et dans package P2 
+  * Utilisation c++ :
+    #include "bbstdCast.h"
+    #include "bbP1B.h"
+    #include "bbP2B.h"
+    main() 
+    {
+       bbtk::BlackBox* b = new bbstd::Cast("b");
+       bbtk::BlackBox* c = new bbP1::B("c");
+       bbtk::BlackBox* d = new bbP2::B("d");
+    }
+
+  * Utilisation bbi :
+    >load std
+    >load P1
+    >load P2
+    >new Cast b 
+    >new B c
+    ERROR : A black box of type B exists in packages P1 and P2. Do you mean P1::B or P2::B ?
+    >new P1::B c
+    >new P2::B d
+    // THIS IS OK
+    >help P1
+    Package P1 v1.0.0 - foo.bar at corp.com
+    My marvelous package
+    Black boxes :
+      B : Uncompress a file in jpeg format
+    >help P2
+    Package P2 v1.0.0 - bar.foo at expat.co
+    I made this package for fun
+    Black boxes :
+      B : Automatic scientific article generator
+    >help B
+    ERROR : A black box of type B exists in packages P1 and P2. Do you mean P1::B or P2::B ?
+    >help P1::B
+    Black box <P1::B>
+    Uncompress a file in jpeg format
+    By : foo.bar at corp.com
+    * Inputs :
+    ...
+
+
+