Salome HOME
Move Hex_defines.hxx to the list of the headers.
[modules/hexablock.git] / src / HEXABLOCK / HexSubShape.hxx
1
2 // class : Gestion des formes associees (Hexa 5)
3
4 #ifndef __SUB_SHAPE_H_
5 #define __SUB_SHAPE_H_
6
7 #include "Hex_defines.hxx"
8 #include "HexEltBase.hxx"
9
10 #include <TopoDS_Shape.hxx>
11
12 BEGIN_NAMESPACE_HEXA
13
14 class HEXABLOCKENGINE_EXPORT SubShape : public EltBase
15 {
16 public :
17     SubShape (NewShape* dad, int id, int dim);
18     NewShape*   getParentShape() const  { return ss_parent; }
19     cpchar      getParentName () const;
20     int         getIdent ()             { return sub_ident ; }
21     int         getDim   ()             { return sub_dim ; }
22
23     const string&       getBrep  ();
24     virtual const TopoDS_Shape& getShape ();
25
26     void   saveXml (XmlWriter* xml);
27     void   callXml (XmlWriter* xml);
28
29 protected :
30     void updateShape  ();
31     void updateBrep   ();
32
33 protected :
34     NewShape* ss_parent;
35     int       sub_ident;
36     int       sub_dim;     // 0 = point, 1 = arete, 2 = face;
37
38     TopoDS_Shape geo_shape;
39     string       geo_brep;
40     bool         maj_brep, maj_shape;
41 };
42 END_NAMESPACE_HEXA
43 #endif