1 // GEOM GEOM : implementaion of GEOM_Gen.idl and GEOM_Shape.idl
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : GEOM_Shape_i.hh
25 // Author : Lucien PIGNOLONI
29 #ifndef __GEOM_SHAPE_I_H__
30 #define __GEOM_SHAPE_I_H__
32 // SALOME config header
33 #include <SALOMEconfig.h>
35 // Standard C++ headers
39 #include CORBA_SERVER_HEADER(GEOM_Gen)
40 #include CORBA_SERVER_HEADER(GEOM_Shape)
43 #include <TopoDS_Shape.hxx>
44 #include <TopoDS_Vertex.hxx>
45 #include <TopExp_Explorer.hxx>
46 #include <BRep_Tool.hxx>
51 //=====================================================================
52 // GEOM_Shape_i : class definition
53 //=====================================================================
54 class GEOM_Shape_i: public POA_GEOM::GEOM_Shape,
55 public PortableServer::RefCountServantBase {
60 GEOM::GEOM_Gen_ptr _engine;
62 GEOM::shape_type _shapetype ; // enum defined in the IDL file (Occ topol. type of a shape)
64 GEOM::GEOM_Shape::ListOfSubShapeID _index;
68 char* _studyshapeid; // exists only if added in the study document
74 // no-arg constructor, doing nothing (for now ?)
77 // constructor to be called for servant creation
78 GEOM_Shape_i(TopoDS_Shape geom,
80 GEOM::GEOM_Gen_ptr engine,
81 const GEOM::GEOM_Shape::ListOfSubShapeID& index,
82 GEOM::shape_type sht = GEOM::SHAPE,
85 // destructor deleting the internal geometry structure
89 void Name(const char* name);
92 void MainName(const char* name);
95 void NameType(const char* name);
98 void IsMainShape(const bool abool);
101 void ShapeId(const char* shapeid);
103 char* StudyShapeId();
104 void StudyShapeId(const char* studyshapeid);
106 GEOM::GEOM_Shape::ListOfSubShapeID* Index();
107 void Index(const GEOM::GEOM_Shape::ListOfSubShapeID&);
109 GEOM::shape_type ShapeType();
110 void ShapeType(GEOM::shape_type sht);
112 GEOM::GEOM_Shape::TMPFile* GetShapeStream();
114 GEOM::GEOM_Gen_ptr Engine();