]> Creatis software - bbtk.git/blob - kernel/appli/bbCreateBox/template_standard.xml
44b70b6d995b9aaf13030e478785570168dbc4e7
[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>
42   <PRE>
43     bbSetOutputOut( bbGetInputIn() );
44     std::cout << "Here I am !" << std::endl;
45   </PRE>
46   </process>
47   #============================================================================
48
49   #============================================================================
50   # CONSTRUCTORS / DESTRUCTORS (OPTIONAL) 
51   # THE CONSTRUCTION METHOD BODY :
52   # Here initializes the input 'In' to 0
53   # This is also where you should allocate the output pointers
54   <constructor><PRE>
55     bbSetInputIn(0);
56   </PRE>
57   </constructor>    
58   # THE COPY-CONSTRUCTION METHOD BODY :
59   # Here does nothing 
60   # But this is where you should allocate the output pointers if any
61   # and copy the pointed values (to avoid bug caused by multiple references)
62   <copyconstructor>
63   <PRE>
64   
65   </PRE>
66   </copyconstructor>    
67   # THE DESTRUCTION METHOD BODY :
68   # Here does nothing 
69   # but this is where you should desallocate the output pointers if any
70  
71   <destructor>
72   <PRE>
73   </PRE>
74   </destructor>    
75   #============================================================================
76
77 #============================================================================
78 # END OF BLACK BOX DESCRIPTION
79 </blackbox>
80 #============================================================================