PageRenderTime 878ms CodeModel.GetById 11ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 851ms

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

http://pythonocc.googlecode.com/
C++ Header | 87 lines | 43 code | 24 blank | 20 comment | 0 complexity | c0d3bba54b1e878de1bcd7021d3b12d5 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//NOTE: This is an intreface to a function for the point creation.
21
22
23#include "SGEOM_Function.hxx"
24
25#define ARG_X     1
26#define ARG_Y     2
27#define ARG_Z     3
28
29#define ARG_REF   4
30
31#define ARG_PARAM 5
32#define ARG_CURVE 6
33
34#define ARG_LINE1 7
35#define ARG_LINE2 8 
36
37#define ARG_SURFACE 9
38#define ARG_PARAM2 10
39
40class GEOMImpl_IPoint
41{
42 public:
43
44  GEOMImpl_IPoint(Handle(GEOM_Function) theFunction): _func(theFunction) {}
45
46  void SetX(const TCollection_AsciiString& theX) { _func->SetReal(ARG_X, theX); }
47  void SetY(const TCollection_AsciiString& theY) { _func->SetReal(ARG_Y, theY); }
48  void SetZ(const TCollection_AsciiString& theZ) { _func->SetReal(ARG_Z, theZ); }
49  
50  void SetX(const double theX) { _func->SetReal(ARG_X, theX); }
51  void SetY(const double theY) { _func->SetReal(ARG_Y, theY); }
52  void SetZ(const double theZ) { _func->SetReal(ARG_Z, theZ); }
53
54  double GetX() { return _func->GetReal(ARG_X); }
55  double GetY() { return _func->GetReal(ARG_Y); }
56  double GetZ() { return _func->GetReal(ARG_Z); }
57
58  void SetRef(Handle(GEOM_Function) theRefPoint) { _func->SetReference(ARG_REF, theRefPoint); }
59
60  Handle(GEOM_Function) GetRef() { return _func->GetReference(ARG_REF); }
61
62  void SetCurve(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_CURVE, theRef); }
63
64  Handle(GEOM_Function) GetCurve() { return _func->GetReference(ARG_CURVE); }
65
66  void SetParameter(const double& theParam) { _func->SetReal(ARG_PARAM, theParam); }
67  void SetParameter(const TCollection_AsciiString& theParam) { _func->SetReal(ARG_PARAM, theParam); }
68
69  double GetParameter() { return _func->GetReal(ARG_PARAM); }
70
71  void SetSurface(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_SURFACE, theRef); }
72  void SetLine1(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_LINE1, theRef); }
73  void SetLine2(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_LINE2, theRef); }
74
75  Handle(GEOM_Function) GetSurface() { return _func->GetReference(ARG_SURFACE); }
76  Handle(GEOM_Function) GetLine1() { return _func->GetReference(ARG_LINE1); }
77  Handle(GEOM_Function) GetLine2() { return _func->GetReference(ARG_LINE2); }
78
79  void SetParameter2(double theParam) { _func->SetReal(ARG_PARAM2, theParam); }
80  void SetParameter2(const TCollection_AsciiString& theParam) { _func->SetReal(ARG_PARAM2, theParam); }
81
82  double GetParameter2() { return _func->GetReal(ARG_PARAM2); }
83  
84 private:
85
86  Handle(GEOM_Function) _func;
87};