Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
XAO_Step.hxx
Go to the documentation of this file.
1 // Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
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 // Author : Frederic Pons (OpenCascade)
20 
21 #ifndef __XAO_STEP_HXX__
22 #define __XAO_STEP_HXX__
23 
24 #include "XAO.hxx"
25 #include "XAO_XaoUtils.hxx"
26 
27 #ifdef WIN32
28 #pragma warning(disable:4290) // Warning Exception ...
29 #endif
30 
31 
32 namespace XAO
33 {
39  {
40  protected:
42  Step() {}
43 
44  public:
48  virtual ~Step() {}
49 
54  virtual const XAO::Type getType() = 0;
55 
60  const int getStep() { return m_step; }
61 
66  void setStep(const int& step) { m_step = step; }
67 
72  const int getStamp() { return m_stamp; }
73 
78  void setStamp(const int& stamp) { m_stamp = stamp; }
79 
84  const int countComponents() { return m_nbComponents; }
85 
90  const int countElements() { return m_nbElements; }
91 
96  const int countValues() { return m_nbElements * m_nbComponents; }
97 
104  virtual const std::string getStringValue(const int& element, const int& component) = 0;
105 
113  virtual void setStringValue(const int& element, const int& component, const std::string& value) = 0;
114 
115  protected:
120  void checkElementIndex(const int& element) throw (XAO_Exception);
125  void checkComponentIndex(const int& component)throw (XAO_Exception);
126 
131  void checkNbElements(const int& nbElements)throw (XAO_Exception);
132 
137  void checkNbComponents(const int& nbComponents)throw (XAO_Exception);
138 
143  void checkNbValues(const int& nbValues)throw (XAO_Exception);
144 
145  protected:
147  int m_step;
149  int m_stamp;
154  };
155 }
156 
157 
158 #endif /* __XAO_STEP_HXX__ */