Version: 9.12.0
GEOMImpl_IPolyline2D.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 //NOTE: This is an interface to a function for the Polyline2D creation.
24 
25 
26 #ifndef _GEOMImpl_IPolyline2D_HXX_
27 #define _GEOMImpl_IPolyline2D_HXX_
28 
29 
30 #include <GEOM_GEOMImpl.hxx>
31 #include <GEOM_Function.hxx>
32 
33 #include <list>
34 
35 #include <TColStd_HArray1OfExtendedString.hxx>
36 #include <TColStd_HArray1OfByte.hxx>
37 #include <TColStd_HArray1OfReal.hxx>
38 
39 
40 #define POLY_ARG_NAMES 1
41 #define POLY_ARG_TYPES 2
42 #define POLY_ARG_CLOSEDS 3
43 #define POLY_ARG_COORDS 4
44 #define POLY_ARG_START_INDICES 5
45 #define POLY_ARG_WPLANE_DBLS 6
46 #define POLY_ARG_WPLANE_OBJ 7
47 
48 
50 {
51  public:
52 
53  GEOMImpl_IPolyline2D(Handle(GEOM_Function) theFunction): _func(theFunction) {}
54 
55  void SetNames(const Handle(TColStd_HArray1OfExtendedString) &theValue)
56  { _func->SetStringArray(POLY_ARG_NAMES, theValue); }
57 
58  Handle(TColStd_HArray1OfExtendedString) GetNames()
59  { return _func->GetStringArray(POLY_ARG_NAMES); }
60 
61  void SetTypes(const Handle(TColStd_HArray1OfByte) &theValue)
62  { _func->SetByteArray(POLY_ARG_TYPES, theValue); }
63 
64  Handle(TColStd_HArray1OfByte) GetTypes()
65  { return _func->GetByteArray(POLY_ARG_TYPES); }
66 
67  void SetClosedFlags(const Handle(TColStd_HArray1OfByte) &theValue)
68  { _func->SetBooleanArray(POLY_ARG_CLOSEDS, theValue); }
69 
70  Handle(TColStd_HArray1OfByte) GetClosedFlags()
71  { return _func->GetBooleanArray(POLY_ARG_CLOSEDS); }
72 
73  void SetWorkingPlaneDbls(const Handle(TColStd_HArray1OfReal) &thePlane)
74  { _func->SetRealArray(POLY_ARG_WPLANE_DBLS, thePlane); }
75 
76  Handle(TColStd_HArray1OfReal) GetWorkingPlaneDbls()
77  { return _func->GetRealArray(POLY_ARG_WPLANE_DBLS); }
78 
79  void SetWorkingPlane(const Handle(GEOM_Function) &thePlane)
80  { _func->SetReference(POLY_ARG_WPLANE_OBJ, thePlane); }
81 
82  Handle(GEOM_Function) GetWorkingPlane()
83  { return _func->GetReference(POLY_ARG_WPLANE_OBJ); }
84 
85  void SetCoords(const std::list <std::list <double> > &theValue);
86 
87  void GetCoords(std::list <std::list <double> > &theValue);
88 
89  private:
90 
91  Handle(GEOM_Function) _func;
92 };
93 
94 #endif
Handle(TColStd_HSequenceOfTransient) AdvancedEngine_IOperations
Create a T-shape object with specified caracteristics for the main and the incident pipes (radius,...
Definition: AdvancedEngine_IOperations.cxx:1907
#define POLY_ARG_WPLANE_DBLS
Definition: GEOMImpl_IPolyline2D.hxx:45
#define POLY_ARG_CLOSEDS
Definition: GEOMImpl_IPolyline2D.hxx:42
#define POLY_ARG_NAMES
Definition: GEOMImpl_IPolyline2D.hxx:40
#define POLY_ARG_WPLANE_OBJ
Definition: GEOMImpl_IPolyline2D.hxx:46
#define POLY_ARG_TYPES
Definition: GEOMImpl_IPolyline2D.hxx:41
#define GEOMIMPL_EXPORT
Definition: GEOM_GEOMImpl.hxx:37
Definition: GEOMImpl_IPolyline2D.hxx:50
Handle(TColStd_HArray1OfReal) GetWorkingPlaneDbls()
Definition: GEOMImpl_IPolyline2D.hxx:76
void SetWorkingPlane(const Handle(GEOM_Function) &thePlane)
Definition: GEOMImpl_IPolyline2D.hxx:79
Handle(TColStd_HArray1OfByte) GetClosedFlags()
Definition: GEOMImpl_IPolyline2D.hxx:70
GEOMImpl_IPolyline2D(Handle(GEOM_Function) theFunction)
Definition: GEOMImpl_IPolyline2D.hxx:53
Handle(TColStd_HArray1OfExtendedString) GetNames()
Definition: GEOMImpl_IPolyline2D.hxx:58
Handle(GEOM_Function) _func
Handle(GEOM_Function) GetWorkingPlane()
Definition: GEOMImpl_IPolyline2D.hxx:82
Handle(TColStd_HArray1OfByte) GetTypes()
Definition: GEOMImpl_IPolyline2D.hxx:64
void SetWorkingPlaneDbls(const Handle(TColStd_HArray1OfReal) &thePlane)
Definition: GEOMImpl_IPolyline2D.hxx:73
void SetNames(const Handle(TColStd_HArray1OfExtendedString) &theValue)
Definition: GEOMImpl_IPolyline2D.hxx:55
void SetClosedFlags(const Handle(TColStd_HArray1OfByte) &theValue)
Definition: GEOMImpl_IPolyline2D.hxx:67
void SetTypes(const Handle(TColStd_HArray1OfByte) &theValue)
Definition: GEOMImpl_IPolyline2D.hxx:61