Salome HOME
NRI : First integration.
[modules/smesh.git] / src / SMESHDS / SMESHDS_SubMesh.hxx
1 // File generated by CPPExt (Transient)
2 //
3 //                     Copyright (C) 1991,1995 by
4 //  
5 //                      MATRA DATAVISION, FRANCE
6 //  
7 // This software is furnished in accordance with the terms and conditions
8 // of the contract and with the inclusion of the above copyright notice.
9 // This software or any other copy thereof may not be provided or otherwise
10 // be made available to any other person. No title to an ownership of the
11 // software is hereby transferred.
12 //  
13 // At the termination of the contract, the software and all copies of this
14 // software must be deleted.
15 //
16 #ifndef _SMESHDS_SubMesh_HeaderFile
17 #define _SMESHDS_SubMesh_HeaderFile
18
19 #ifndef _Standard_HeaderFile
20 #include <Standard.hxx>
21 #endif
22 #ifndef _Handle_SMESHDS_SubMesh_HeaderFile
23 #include "Handle_SMESHDS_SubMesh.hxx"
24 #endif
25
26 #ifndef _Handle_SMDS_Mesh_HeaderFile
27 #include "Handle_SMDS_Mesh.hxx"
28 #endif
29 #ifndef _SMDS_MapOfMeshElement_HeaderFile
30 #include "SMDS_MapOfMeshElement.hxx"
31 #endif
32 #ifndef _Standard_Boolean_HeaderFile
33 #include <Standard_Boolean.hxx>
34 #endif
35 #ifndef _TColStd_ListOfInteger_HeaderFile
36 #include <TColStd_ListOfInteger.hxx>
37 #endif
38 #ifndef _MMgt_TShared_HeaderFile
39 #include <MMgt_TShared.hxx>
40 #endif
41 #ifndef _Handle_SMDS_MeshElement_HeaderFile
42 #include "Handle_SMDS_MeshElement.hxx"
43 #endif
44 #ifndef _Handle_SMDS_MeshNode_HeaderFile
45 #include "Handle_SMDS_MeshNode.hxx"
46 #endif
47 #ifndef _Standard_Integer_HeaderFile
48 #include <Standard_Integer.hxx>
49 #endif
50 class SMDS_Mesh;
51 class SMDS_MeshElement;
52 class SMDS_MeshNode;
53 class SMDS_MapOfMeshElement;
54 class TColStd_ListOfInteger;
55
56
57 class SMESHDS_SubMesh : public MMgt_TShared {
58
59 public:
60
61     inline void* operator new(size_t,void* anAddress) 
62       {
63         return anAddress;
64       }
65     inline void* operator new(size_t size) 
66       { 
67         return Standard::Allocate(size); 
68       }
69     inline void  operator delete(void *anAddress) 
70       { 
71         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
72       }
73 //    inline void  operator delete(void *anAddress, size_t size) 
74 //      { 
75 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
76 //      }
77  // Methods PUBLIC
78  // 
79 Standard_EXPORT SMESHDS_SubMesh(const Handle(SMDS_Mesh)& M);
80 Standard_EXPORT   void AddElement(const Handle(SMDS_MeshElement)& ME) ;
81 Standard_EXPORT   void RemoveElement(const Handle(SMDS_MeshElement)& ME) ;
82 Standard_EXPORT   void AddNode(const Handle(SMDS_MeshNode)& ME) ;
83 Standard_EXPORT   void RemoveNode(const Handle(SMDS_MeshNode)& ME) ;
84 Standard_EXPORT   Standard_Integer NbElements() ;
85 Standard_EXPORT  const SMDS_MapOfMeshElement& GetElements() ;
86 Standard_EXPORT  const TColStd_ListOfInteger& GetIDElements() ;
87 Standard_EXPORT   Standard_Integer NbNodes() ;
88 Standard_EXPORT  const SMDS_MapOfMeshElement& GetNodes() ;
89 Standard_EXPORT  const TColStd_ListOfInteger& GetIDNodes() ;
90 Standard_EXPORT ~SMESHDS_SubMesh();
91
92
93
94
95  // Type management
96  //
97  Standard_EXPORT friend Handle_Standard_Type& SMESHDS_SubMesh_Type_();
98  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
99  Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
100
101 protected:
102
103  // Methods PROTECTED
104  // 
105
106
107  // Fields PROTECTED
108  //
109
110
111 private: 
112
113  // Methods PRIVATE
114  // 
115
116
117  // Fields PRIVATE
118  //
119 Handle_SMDS_Mesh myMesh;
120 SMDS_MapOfMeshElement myElements;
121 SMDS_MapOfMeshElement myNodes;
122 Standard_Boolean myListOfEltIDIsUpdate;
123 TColStd_ListOfInteger myListOfEltID;
124 Standard_Boolean myListOfNodeIDIsUpdate;
125 TColStd_ListOfInteger myListOfNodeID;
126
127
128 };
129
130
131
132
133
134 // other inline functions and methods (like "C++: function call" methods)
135 //
136
137
138 #endif