]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager.cxx
#3493 MeshManager
[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 }
55
56 //===== 
57 // 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)
58 //===== 
59 void MeshManager::bbUserSetDefaultValues()
60 {
61 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
62 //    Here we initialize the input 'In' to 0
63 //   bbSetInputIn(0);
64     meshManagerModel_Box = NULL;
65     bbSetInputMesh(NULL);
66 }
67
68 //===== 
69 // 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)
70 //===== 
71 void MeshManager::bbUserInitializeProcessing()
72 {
73 //  THE INITIALIZATION METHOD BODY :
74 //    Here does nothing 
75 //    but this is where you should allocate the internal/output pointers 
76 //    if any
77 }
78
79 //===== 
80 // 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)
81 //===== 
82 void MeshManager::bbUserFinalizeProcessing()
83 {
84 //  THE FINALIZATION METHOD BODY :
85 //    Here does nothing 
86 //    but this is where you should desallocate the internal/output pointers 
87 //    if any
88 }
89
90 } // EO namespace bbcreaVtk
91
92