]> Creatis software - crea.git/blob - appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/src/bbmySamplePackagemySampleBox1.cxx
change to CMakeLists.txt when configuring files
[crea.git] / appli / creaNewProject / NewProject / bbtk_mySamplePackage_PKG / src / bbmySamplePackagemySampleBox1.cxx
1
2 #include "bbmySamplePackagemySampleBox1.h"
3 #include "bbmySamplePackagePackage.h"
4 namespace bbmySamplePackage
5 {
6
7 BBTK_ADD_BLACK_BOX_TO_PACKAGE(mySamplePackage,mySampleBox1)
8 BBTK_BLACK_BOX_IMPLEMENTATION(mySampleBox1,bbtk::AtomicBlackBox);
9
10 void mySampleBox1::Process()
11 {
12
13 // THE MAIN PROCESSING METHOD BODY
14 //   Here we simply set the input 'In' value to the output 'Out'
15 //   And print out the output value
16 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
17 //    void bbSet{Input|Output}NAME(const TYPE&)
18 //    const TYPE& bbGet{Input|Output}NAME() const 
19 //    Where :
20 //    * NAME is the name of the input/output
21 //      (the one provided in the attribute 'name' of the tag 'input')
22 //    * TYPE is the C++ type of the input/output
23 //      (the one provided in the attribute 'type' of the tag 'input')
24
25     c.SetX(bbGetInputIn1()); 
26     c.SetY(bbGetInputIn2());
27     c.Execute();
28     bbSetOutputOut(c.GetResult());
29     
30     std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
31   
32 }
33
34 void mySampleBox1::bbUserSetDefaultValues()
35 {
36
37 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
38    bbSetInputIn1(0);
39    bbSetInputIn2(0);  
40 }
41
42 void mySampleBox1::bbUserInitializeProcessing()
43 {
44
45 //  THE INITIALIZATION METHOD BODY :
46 //    Here does nothing 
47 //    but this is where you should allocate the internal/output pointers 
48 //    if any 
49
50   
51 }
52  
53 void mySampleBox1::bbUserFinalizeProcessing()
54 {
55
56 //  THE FINALIZATION METHOD BODY :
57 //    Here does nothing 
58 //    but this is where you should desallocate the internal/output pointers 
59 //    if any
60   
61 }
62 }
63 // EO namespace bbmySamplePackage
64
65