1 // Copyright (C) 2007-2014 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, or (at your option) any later version.
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
19 // Author : Anthony Geay (CEA/DEN)
21 #include "MEDCalculatorBrowserStep.hxx"
25 using namespace ParaMEDMEM;
27 MEDCalculatorBrowserStep::~MEDCalculatorBrowserStep()
31 // Equal to int operator
32 // Used to compare the time step id with input argument.
33 // Return if equal or not.
34 bool MEDCalculatorBrowserStep::operator==(int ts)
36 return _time_step==ts;
39 // Equal to int operator
40 // Used to compare the time step id with input argument.
41 // Return if equal or not.
42 bool MEDCalculatorBrowserStep::operator==(int ts) const
44 return _time_step==ts;
47 // Equal to bool operator
48 // To test if this time step is selected or not comparing to a boolean
49 // Return if it has the same statement or not.
50 bool MEDCalculatorBrowserStep::operator==(bool sel)
52 return sel==_selection;
56 // Construct a std::string to print this time step, using std::cout for example
57 // Put x or o for selected or not
58 // Add time step id value ( tiem value )
59 // Return a std::string
60 std::string MEDCalculatorBrowserStep::str()
62 std::ostringstream res;
63 _selection?res<<"x ":res<<"o ";
64 res << _time_step << "," << _order;
71 // Select this time step setting selection flag to true
72 void MEDCalculatorBrowserStep::select()
77 // Unselect this time step setting selection flag to false
78 void MEDCalculatorBrowserStep::unselect()
83 // Return if this time step is selected or not
84 bool MEDCalculatorBrowserStep::isSelected()
89 // Return the timestep id
90 int MEDCalculatorBrowserStep::getTimeStep() const
95 // Return the time value
96 const double& MEDCalculatorBrowserStep::getTimeValue() const
101 // Return the name of the support meshing
102 const std::string& MEDCalculatorBrowserStep::getCorrespondingMeshFromStep() const