]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkOutputWindow.cxx
Clean code
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkOutputWindow.cxx
1 //===== 
2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
3 //===== 
4 #include "bbcreaVtkOutputWindow.h"
5 #include "bbcreaVtkPackage.h"
6 namespace bbcreaVtk
7 {
8
9 vtkOutputWindowBBTK::vtkOutputWindowBBTK() {}
10 void vtkOutputWindowBBTK::DisplayDebugText (const char *) {}
11 void vtkOutputWindowBBTK::DisplayText (const char *) {}
12 void vtkOutputWindowBBTK::DisplayErrorText (const char *) {}
13 void vtkOutputWindowBBTK::DisplayWarningText (const char *) {}
14 void vtkOutputWindowBBTK::DisplayGenericWarningText (const char *) {}
15
16 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,OutputWindow)
17 BBTK_BLACK_BOX_IMPLEMENTATION(OutputWindow,bbtk::AtomicBlackBox);
18 //===== 
19 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
20 //===== 
21 void OutputWindow::Process()
22 {
23 // THE MAIN PROCESSING METHOD BODY
24 //   Here we simply set the input 'In' value to the output 'Out'
25 //   And print out the output value
26 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
27 //    void bbSet{Input|Output}NAME(const TYPE&)
28 //    const TYPE& bbGet{Input|Output}NAME() const 
29 //    Where :
30 //    * NAME is the name of the input/output
31 //      (the one provided in the attribute 'name' of the tag 'input')
32 //    * TYPE is the C++ type of the input/output
33 //      (the one provided in the attribute 'type' of the tag 'input')
34
35 //    bbSetOutputOut( bbGetInputIn() );
36 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
37   
38         if (firsttime==true)
39         {
40                 firsttime=false;
41                 vtkOutputWindowBBTK *w= vtkOutputWindowBBTK::New();
42         w->SetDisplayModeToNever();
43                 vtkOutputWindow::SetInstance( w );
44         w->Delete();
45         vtkObject::GlobalWarningDisplayOff();
46         }
47 }
48 //===== 
49 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
50 //===== 
51 void OutputWindow::bbUserSetDefaultValues()
52 {
53
54 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
55 //    Here we initialize the input 'In' to 0
56
57     firsttime=true;
58 //   bbSetInputIn(0);
59 }
60 //===== 
61 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
62 //===== 
63
64 void OutputWindow::bbUserInitializeProcessing()
65 {
66 //  THE INITIALIZATION METHOD BODY :
67 //    Here does nothing 
68 //    but this is where you should allocate the internal/output pointers 
69 //    if any
70 }
71 //===== 
72 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
73 //===== 
74 void OutputWindow::bbUserFinalizeProcessing()
75 {
76     //  THE FINALIZATION METHOD BODY :
77     //    Here does nothing
78     //    but this is where you should desallocate the internal/output pointers
79     //    if any
80 }
81
82 }// EO namespace bbcreaVtk
83
84