PageRenderTime 27ms CodeModel.GetById 13ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 1ms

/src/contrib/geom-5.1.2.7/inc_pythonocc/SGEOM_Parameter.hxx

http://pythonocc.googlecode.com/
C++ Header | 66 lines | 31 code | 15 blank | 20 comment | 0 complexity | 2a8a02f2a320c6232d47a0b8936b9450 MD5 | raw file
 1// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 2// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 3// 
 4// This library is free software; you can redistribute it and/or
 5// modify it under the terms of the GNU Lesser General Public
 6// License as published by the Free Software Foundation; either 
 7// version 2.1 of the License.
 8// 
 9// This library is distributed in the hope that it will be useful 
10// but WITHOUT ANY WARRANTY; without even the implied warranty of 
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12// Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public  
15// License along with this library; if not, write to the Free Software 
16// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17//
18// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19
20#ifndef _GEOM_Parameter_HeaderFile
21#define _GEOM_Parameter_HeaderFile
22
23#ifndef _Standard_HeaderFile
24#include <Standard.hxx>
25#endif
26#ifndef _Standard_CString_HeaderFile
27#include <Standard_CString.hxx>
28#endif
29#ifndef _TCollection_AsciiString_HeaderFile
30#include <TCollection_AsciiString.hxx>
31#endif
32
33//!Class used as parameter in many geometric drivers.It may contain real number
34//!or a variable.
35class GEOM_Parameter
36{
37
38 public:
39
40  Standard_EXPORT GEOM_Parameter();
41  Standard_EXPORT GEOM_Parameter(TCollection_AsciiString anAsciiString);
42  Standard_EXPORT GEOM_Parameter(Standard_Real aDouble);
43
44  Standard_EXPORT ~GEOM_Parameter();
45
46  Standard_EXPORT Standard_Boolean IsString() const;
47  Standard_EXPORT Standard_Boolean IsDouble() const;
48
49  Standard_EXPORT Standard_Real GetDouble() const;
50  Standard_EXPORT TCollection_AsciiString GetString() const;
51
52  Standard_EXPORT void operator=(Standard_Real aDouble);
53  Standard_EXPORT void operator=(const TCollection_AsciiString& anAsciiString);
54
55protected:
56
57
58
59private: 
60  TCollection_AsciiString 	myAsciiString;
61  Standard_Real				myDouble;
62
63  enum ParameterType {ptDouble, ptString} myParameterType;
64};
65
66#endif