]> SALOME platform Git repositories - modules/hexablock.git/blob - src/HEXABLOCK/HexSubShape.hxx
Salome HOME
Merge from V6_main 01/04/2013
[modules/hexablock.git] / src / HEXABLOCK / HexSubShape.hxx
1
2 // class : Gestion des formes associees (Hexa 5)
3
4 // Copyright (C) 2009-2013  CEA/DEN, EDF R&D
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.
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 #ifndef __SUB_SHAPE_H_
24 #define __SUB_SHAPE_H_
25
26
27
28 #include "HexEltBase.hxx"
29
30 #ifndef NO_CASCADE
31 #include <TopoDS_Shape.hxx>
32 #endif
33
34 BEGIN_NAMESPACE_HEXA
35
36 class SubShape : public EltBase
37 {
38 public :
39     SubShape (NewShape* dad, int id, int dim);
40     NewShape*   getParentShape() const  { return ss_parent; }
41     cpchar      getParentName () const;
42     int         getIdent ()             { return sub_ident ; }
43     int         getDim   ()             { return sub_dim ; }
44
45     const string&       getBrep  ();
46     const TopoDS_Shape& getShape ();
47
48     void   saveXml (XmlWriter* xml);
49     void   callXml (XmlWriter* xml);
50
51 protected :
52     void updateShape  ();
53     void updateBrep   ();
54
55 protected :
56     NewShape* ss_parent;
57     int       sub_ident;
58     int       sub_dim;     // 0 = point, 1 = arete, 2 = face;
59
60     TopoDS_Shape geo_shape;
61     string       geo_brep;
62     bool         maj_brep, maj_shape;
63 };
64 END_NAMESPACE_HEXA
65 #endif