]> Creatis software - bbtk.git/blob - kernel/appli/bbCreateBlackBox/xml-templates/std-template.xml
e40b521e4e5ea2ff39436af44e7a5ed50c3659a8
[bbtk.git] / kernel / appli / bbCreateBlackBox / xml-templates / std-template.xml
1 <!--==========================================================================
2    STARTS THE DESCRIPTION OF THE BLACK BOX -->
3 <blackbox name="__BLACKBOXNAME__">
4 <!--=======================================================================-->
5
6   <!--========================================================================
7     THE BOX DOCUMENTATION -->
8
9   <author>__AUTHOR__</author>
10   <description>__DESCRIPTION__</description>
11   <category>__CATEGORY__</category>
12   <!--=====================================================================-->
13
14   <!--========================================================================
15     #include directives to be put in the .h generated
16     There must be one tag per file to include
17     Here we include the standard header iostream.h -->
18   <include><PRE>iostream</PRE></include>
19   <!--=====================================================================-->
20
21   <!--========================================================================
22     INPUTS/OUTPUTS DECLARATION -->
23   <!-- Declares an input with name 'In', type 'double' 
24       and description 'First input' -->
25
26   <input name="In" type="double" description="First input"/>
27   
28   <!-- Declares an output with name 'Out', type 'double' 
29       and description 'First output' -->
30   <output name="Out" type="double" description="First output"/>
31   <!--=====================================================================-->
32
33   <process>
34   <PRE>
35 // THE MAIN PROCESSING METHOD BODY
36 //   Here we simply set the input 'In' value to the output 'Out'
37 //   And print out the output value
38 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
39 //    void bbSet{Input|Output}NAME(const TYPE&)
40 //    const TYPE& bbGet{Input|Output}NAME() const 
41 //    Where :
42 //    * NAME is the name of the input/output
43 //      (the one provided in the attribute 'name' of the tag 'input')
44 //    * TYPE is the C++ type of the input/output
45 //      (the one provided in the attribute 'type' of the tag 'input')
46     bbSetOutputOut( bbGetInputIn() );
47     std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
48   </PRE>
49   </process>
50   <!--=====================================================================-->
51
52    <defaultValues>
53   <PRE>
54 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
55 //    Here we initialize the input 'In' to 0
56    bbSetInputIn(0);
57   </PRE>
58   </defaultValues>
59
60
61
62   <initializeProcessing>
63   <PRE>
64 //  THE INITIALIZATION METHOD BODY :
65 //    Here does nothing 
66 //    but this is where you should allocate the internal/output pointers 
67 //    if any 
68
69   </PRE>
70   </initializeProcessing>
71
72   <finalizeProcessing>
73   <PRE>
74 //  THE FINALIZATION METHOD BODY :
75 //    Here does nothing 
76 //    but this is where you should desallocate the internal/output pointers 
77 //    if any
78   </PRE>
79   </finalizeProcessing>
80  <!--=====================================================================-->
81
82 <!--=======================================================================-->
83 <!-- END OF BLACK BOX DESCRIPTION -->
84 </blackbox>
85 <!--=======================================================================-->