/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. #ifndef _GEOM_Parameter_HeaderFile
  20. #define _GEOM_Parameter_HeaderFile
  21. #ifndef _Standard_HeaderFile
  22. #include <Standard.hxx>
  23. #endif
  24. #ifndef _Standard_CString_HeaderFile
  25. #include <Standard_CString.hxx>
  26. #endif
  27. #ifndef _TCollection_AsciiString_HeaderFile
  28. #include <TCollection_AsciiString.hxx>
  29. #endif
  30. //!Class used as parameter in many geometric drivers.It may contain real number
  31. //!or a variable.
  32. class GEOM_Parameter
  33. {
  34. public:
  35. Standard_EXPORT GEOM_Parameter();
  36. Standard_EXPORT GEOM_Parameter(TCollection_AsciiString anAsciiString);
  37. Standard_EXPORT GEOM_Parameter(Standard_Real aDouble);
  38. Standard_EXPORT ~GEOM_Parameter();
  39. Standard_EXPORT Standard_Boolean IsString() const;
  40. Standard_EXPORT Standard_Boolean IsDouble() const;
  41. Standard_EXPORT Standard_Real GetDouble() const;
  42. Standard_EXPORT TCollection_AsciiString GetString() const;
  43. Standard_EXPORT void operator=(Standard_Real aDouble);
  44. Standard_EXPORT void operator=(const TCollection_AsciiString& anAsciiString);
  45. protected:
  46. private:
  47. TCollection_AsciiString myAsciiString;
  48. Standard_Real myDouble;
  49. enum ParameterType {ptDouble, ptString} myParameterType;
  50. };
  51. #endif