]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager.cxx
Clean Code
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkMeshManager.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 "bbcreaVtkMeshManager.h"
5 #include "bbcreaVtkPackage.h"
6 namespace bbcreaVtk
7 {
8
9 MeshManagerModel_Box::MeshManagerModel_Box( MeshManager *box )
10 {
11     mBox=box;
12 }
13
14 MeshManagerModel_Box::~MeshManagerModel_Box( )
15 {
16 }
17
18 void MeshManagerModel_Box::RefreshOutputs( )
19 {
20     mBox->bbSetOutputMeshBase( GetMeshBase() );
21     mBox->bbSetOutputMeshTemp( GetMeshTemp() );
22     mBox->bbSignalOutputModification();
23 }
24
25
26 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MeshManager)
27 BBTK_BLACK_BOX_IMPLEMENTATION(MeshManager,bbtk::AtomicBlackBox);
28 //===== 
29 // 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)
30 //===== 
31 void MeshManager::Process()
32 {
33 // THE MAIN PROCESSING METHOD BODY
34 //   Here we simply set the input 'In' value to the output 'Out'
35 //   And print out the output value
36 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
37 //    void bbSet{Input|Output}NAME(const TYPE&)
38 //    const TYPE& bbGet{Input|Output}NAME() const 
39 //    Where :
40 //    * NAME is the name of the input/output
41 //      (the one provided in the attribute 'name' of the tag 'input')
42 //    * TYPE is the C++ type of the input/output
43 //      (the one provided in the attribute 'type' of the tag 'input')
44 //    bbSetOutputOut( bbGetInputIn() );
45 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
46     
47     if (meshManagerModel_Box==NULL)
48     {
49         meshManagerModel_Box = new MeshManagerModel_Box(this);
50         meshManagerModel_Box->SetMeshBase( bbGetInputMesh() );
51         meshManagerModel_Box->RefreshOutputs();
52         bbSetOutputMeshManagerModel( meshManagerModel_Box );
53     } // if meshManagerModel_Box
54     printf("PG MeshManager::Process end %s \n", bbGetFullName().c_str() );
55 }
56
57 //===== 
58 // 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)
59 //===== 
60 void MeshManager::bbUserSetDefaultValues()
61 {
62 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
63 //    Here we initialize the input 'In' to 0
64 //   bbSetInputIn(0);
65     meshManagerModel_Box = NULL;
66     bbSetInputMesh(NULL);
67 }
68
69 //===== 
70 // 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)
71 //===== 
72 void MeshManager::bbUserInitializeProcessing()
73 {
74 //  THE INITIALIZATION METHOD BODY :
75 //    Here does nothing 
76 //    but this is where you should allocate the internal/output pointers 
77 //    if any
78 }
79
80 //===== 
81 // 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)
82 //===== 
83 void MeshManager::bbUserFinalizeProcessing()
84 {
85 //  THE FINALIZATION METHOD BODY :
86 //    Here does nothing 
87 //    but this is where you should desallocate the internal/output pointers 
88 //    if any
89 }
90
91 } // EO namespace bbcreaVtk
92
93