1 <!--==========================================================================
2 STARTS THE DESCRIPTION OF THE BLACK BOX -->
3 <blackbox name="__BLACKBOXNAME__">
4 <!--=======================================================================-->
6 <!--========================================================================
7 THE BOX DOCUMENTATION -->
8 <author>__AUTHOR__</author>
9 <description>__DESCRIPTION__</description>
10 <category>__CATEGORY__</category>
11 <!--=====================================================================-->
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>iostream</PRE></include>
18 <!--=====================================================================-->
20 <!--========================================================================
21 INPUTS/OUTPUTS DECLARATION -->
22 <!-- Declares an input with name 'In', type 'double'
23 and description 'First input' -->
24 <input name="In" type="double" description="First input"/>
26 <!-- Declares an output with name 'Out', type 'double'
27 and description 'First output' -->
28 <output name="Out" type="double" description="First output"/>
29 <!--=====================================================================-->
31 <!--========================================================================
32 THE PROCESSING METHOD BODY :
33 Here simpy copies the value of the input 'In' to the output 'Out'
34 And prints out the value
35 INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
36 void bbSet{Input|Output}NAME(const TYPE&)
37 const TYPE& bbGet{Input|Output}NAME() const
39 * NAME is the name of the input/output
40 (the one provided in the attribute 'name' of the tag 'input')
41 * TYPE is the C++ type of the input/output
42 (the one provided in the attribute 'type' of the tag 'input') -->
44 bbSetOutputOut( bbGetInputIn() );
45 std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
47 <!--=====================================================================-->
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 -->
57 <!-- THE COPY-CONSTRUCTION METHOD BODY :
59 But this is where you should allocate the output pointers if any
60 and copy the pointed values (to avoid bug caused by multiple references)-->
61 <copyconstructor><PRE>
62 </PRE></copyconstructor>
63 <!-- THE DESTRUCTION METHOD BODY :
65 but this is where you should desallocate the output pointers if any -->
68 <!--=====================================================================-->
70 <!--=======================================================================-->
71 <!-- END OF BLACK BOX DESCRIPTION -->
73 <!--=======================================================================-->