Salome HOME
Convenience factory client
[modules/med.git] / src / MEDCalc / cmp / MEDPresentationManager_i.cxx
1 // Copyright (C) 2011-2015  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #include "MEDPresentationManager_i.hxx"
21 #include "MEDFactoryClient.hxx"
22
23 MEDPresentationManager_i* MEDPresentationManager_i::_instance = NULL;
24
25 MEDPresentationManager_i*
26 MEDPresentationManager_i::getInstance() {
27   if ( _instance == NULL )
28     _instance = new MEDPresentationManager_i();
29   return _instance;
30 }
31
32 MEDPresentationManager_i::MEDPresentationManager_i()
33 {
34 }
35
36 MEDPresentationManager_i::~MEDPresentationManager_i()
37 {
38   /*
39   std::vector<MEDPresentation*>::iterator itr = this->_presentations.begin();
40   for ( ; itr != this->_presentations.end(); ++itr) {
41     delete *itr;
42     *itr = NULL;
43   }
44   this->_presentations.clear();
45   */
46 }
47
48 #include <iostream>
49
50 void
51 MEDPresentationManager_i::MakeScalarMap(const MEDCALC::ScalarMapParameters& params)
52 {
53   std::cout << "MEDPresentationManager_i::MakeScalarMap: Not implemented yet\n";
54
55   std::size_t fieldHandlerId = params.fieldHandlerId;
56   MEDCALC::MEDPresentationViewMode viewMode = params.viewMode;
57
58   std::cout << "\tfieldHandlerId: " << fieldHandlerId << std::endl;
59   std::cout << "\tviewMode: " << viewMode << std::endl;
60
61   MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldHandlerId);
62
63 }