1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "MEDCalculatorBrowserStep.hxx"
24 using namespace ParaMEDMEM;
26 MEDCalculatorBrowserStep::~MEDCalculatorBrowserStep()
30 // Equal to int operator
31 // Used to compare the time step id with input argument.
32 // Return if equal or not.
33 bool MEDCalculatorBrowserStep::operator==(int ts)
35 return _time_step==ts;
38 // Equal to int operator
39 // Used to compare the time step id with input argument.
40 // Return if equal or not.
41 bool MEDCalculatorBrowserStep::operator==(int ts) const
43 return _time_step==ts;
46 // Equal to bool operator
47 // To test if this time step is selected or not comparing to a boolean
48 // Return if it has the same statement or not.
49 bool MEDCalculatorBrowserStep::operator==(bool sel)
51 return sel==_selection;
55 // Construct a std::string to print this time step, using std::cout for example
56 // Put x or o for selected or not
57 // Add time step id value ( tiem value )
58 // Return a std::string
59 std::string MEDCalculatorBrowserStep::str()
61 std::ostringstream res;
62 _selection?res<<"x ":res<<"o ";
63 res << _time_step << "," << _order;
70 // Select this time step setting selection flag to true
71 void MEDCalculatorBrowserStep::select()
76 // Unselect this time step setting selection flag to false
77 void MEDCalculatorBrowserStep::unselect()
82 // Return if this time step is selected or not
83 bool MEDCalculatorBrowserStep::isSelected()
88 // Return the timestep id
89 int MEDCalculatorBrowserStep::getTimeStep() const
94 // Return the time value
95 const double& MEDCalculatorBrowserStep::getTimeValue() const
100 // Return the name of the support meshing
101 const std::string& MEDCalculatorBrowserStep::getCorrespondingMeshFromStep() const