Version: 9.12.0
XAO_Step.hxx
Go to the documentation of this file.
1 // Copyright (C) 2013-2023 CEA, EDF, 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 XAO::Type getType() = 0;
55 
60  int getStep() { return m_step; }
61 
66  void setStep(int step) { m_step = step; }
67 
72  int getStamp() { return m_stamp; }
73 
78  void setStamp(int stamp) { m_stamp = stamp; }
79 
84  int countComponents() { return m_nbComponents; }
85 
90  int countElements() { return m_nbElements; }
91 
96  int countValues() { return m_nbElements * m_nbComponents; }
97 
104  virtual const std::string getStringValue(int element, int component) = 0;
105 
113  virtual void setStringValue(int element, int component, const std::string& value) = 0;
114 
115  protected:
120  void checkElementIndex(int element);
125  void checkComponentIndex(int component);
126 
131  void checkNbElements(int nbElements);
132 
137  void checkNbComponents(int nbComponents);
138 
143  void checkNbValues(int nbValues);
144 
145  protected:
147  int m_step;
149  int m_stamp;
154  };
155 }
156 
157 
158 #endif /* __XAO_STEP_HXX__ */
#define XAO_EXPORT
Definition: XAO.hxx:31
Base class for steps.
Definition: XAO_Step.hxx:39
int m_nbComponents
The number of components.
Definition: XAO_Step.hxx:151
void setStep(int step)
Sets the number of the step.
Definition: XAO_Step.hxx:66
int countElements()
Gets the number of elements for the step.
Definition: XAO_Step.hxx:90
void setStamp(int stamp)
Sets the stamp of the index.
Definition: XAO_Step.hxx:78
int getStep()
Gets the step index.
Definition: XAO_Step.hxx:60
int countComponents()
Gets the number of components of the step.
Definition: XAO_Step.hxx:84
int getStamp()
Gets the stamp of the index.
Definition: XAO_Step.hxx:72
int m_step
the index of the step.
Definition: XAO_Step.hxx:147
int countValues()
Gets the number of values for the step.
Definition: XAO_Step.hxx:96
int m_stamp
The stamp of the step.
Definition: XAO_Step.hxx:149
virtual XAO::Type getType()=0
Gets the type of the step.
virtual ~Step()
Destructor.
Definition: XAO_Step.hxx:48
virtual const std::string getStringValue(int element, int component)=0
Gets a value as a string.
int m_nbElements
The number of elements.
Definition: XAO_Step.hxx:153
virtual void setStringValue(int element, int component, const std::string &value)=0
Sets a value as a string.
Step()
Default constructor.
Definition: XAO_Step.hxx:42
Definition: BrepGeometryTest.hxx:26
Type
Definition: XAO_XaoUtils.hxx:62