]> Creatis software - bbtk.git/blob - kernel/appli/bbCreateBox/template_standard.xml
8d727e5229df85e4c3cfa13d3531480bc3b4814d
[bbtk.git] / kernel / appli / bbCreateBox / template_standard.xml
1 #============================================================================
2 # STARTS THE DESCRIPTION OF THE BLACK BOX
3 <blackbox name="BBCB_BOX_NAME">
4 #============================================================================
5
6   #============================================================================
7   # THE BOX DOCUMENTATION
8   <author>BBCB_AUTHOR</author>
9   <description>BBCB_DESCRIPTION</description>
10   <category>BBCB_CATEGORY</category>
11   #============================================================================
12
13   #============================================================================
14   # #include directives to be put in the .h generated
15   # There must be one tag per file to include
16   # Here we include the standard header iostream.h
17   <include><PRE>
18     iostream.h
19   </PRE></include>
20   #============================================================================
21
22   #============================================================================
23   # INPUTS/OUTPUTS DECLARATION
24   # Declares an input with name 'In', type 'double' and description 'First input'
25   <input name="In" type="double" description="First input"/>
26   # Declares an output with name 'Out', type 'double' and description 'First output'
27   <output name="Out" type="double" description="First output"/>
28   #============================================================================
29
30   #============================================================================
31   # THE PROCESSING METHOD BODY :
32   # Here simpy copies the value of the input 'In' to the output 'Out'
33   # INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
34   # void bbSet{Input|Output}NAME(const TYPE&)
35   # const TYPE& bbGet{Input|Output}NAME() const 
36   # Where :
37   # * NAME is the name of the input/output
38   #   (the one provided in the attribute 'name' of the tag <input>)
39   # * TYPE is the C++ type of the input/output
40   #   (the one provided in the attribute 'type' of the tag <input>)
41   <process><PRE>
42     bbSetOutputOut( bbGetInputIn() );
43     std::cout << "Here I am !" << std::endl;
44   </PRE></process>
45   #============================================================================
46
47   #============================================================================
48   # CONSTRUCTORS / DESTRUCTORS (OPTIONAL) 
49   # THE CONSTRUCTION METHOD BODY :
50   # Here initializes the input 'In' to 0
51   # This is also where you should allocate the output pointers
52   <constructor><PRE>
53     bbSetInputIn(0);
54   </PRE></constructor>    
55   # THE COPY-CONSTRUCTION METHOD BODY :
56   # Here does nothing 
57   # But this is where you should allocate the output pointers if any
58   # and copy the pointed values (to avoid bug caused by multiple references)
59   <copyconstructor><PRE>
60   </PRE></copyconstructor>    
61   # THE DESTRUCTION METHOD BODY :
62   # Here does nothing 
63   # but this is where you should desallocate the output pointers if any
64   <destructor><PRE>
65   </PRE></destructor>    
66   #============================================================================
67
68 #============================================================================
69 # END OF BLACK BOX DESCRIPTION
70 </blackbox>
71 #============================================================================