Salome HOME
Abu : Mise a jour HEXABLOCK
[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 "HexEltBase.hxx"
8
9 #include <TopoDS_Shape.hxx>
10
11 BEGIN_NAMESPACE_HEXA
12
13 class HexaExport SubShape : public EltBase
14 {
15 public :
16     SubShape (NewShape* dad, int id, int dim);
17     NewShape*   getParentShape() const  { return ss_parent; }
18     cpchar      getParentName () const;
19     int         getIdent ()             { return sub_ident ; }
20     int         getDim   ()             { return sub_dim ; }
21     virtual EnumKindOfShape kindOf ()   { return kind_of ; }
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     EnumKindOfShape kind_of;
42 };
43 END_NAMESPACE_HEXA
44 #endif