Salome HOME
NRI : Change lGeometryClient by lGEOMClient.
[modules/smesh.git] / src / SMDS / SMDS_MeshElement.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 _SMDS_MeshElement_HeaderFile
17 #define _SMDS_MeshElement_HeaderFile
18
19 #ifndef _Standard_HeaderFile
20 #include <Standard.hxx>
21 #endif
22 #ifndef _Handle_SMDS_MeshElement_HeaderFile
23 #include "Handle_SMDS_MeshElement.hxx"
24 #endif
25
26 #ifndef _Standard_Integer_HeaderFile
27 #include <Standard_Integer.hxx>
28 #endif
29 #ifndef _SMDSAbs_ElementType_HeaderFile                                                                           
30 #include "SMDSAbs_ElementType.hxx"
31 #endif
32 #ifndef _Handle_TColgp_HArray1OfDir_HeaderFile
33 #include "Handle_TColgp_HArray1OfDir.hxx"
34 #endif
35 #ifndef _SMDS_MeshObject_HeaderFile
36 #include "SMDS_MeshObject.hxx"
37 #endif
38 #ifndef _Standard_Boolean_HeaderFile
39 #include <Standard_Boolean.hxx>
40 #endif
41 #ifndef _Standard_Address_HeaderFile
42 #include <Standard_Address.hxx>
43 #endif
44 #ifndef _Standard_Real_HeaderFile
45 #include <Standard_Real.hxx>
46 #endif
47 #ifndef _Standard_OStream_HeaderFile
48 #include <Standard_OStream.hxx>
49 #endif
50 class TColgp_HArray1OfDir;
51 class Standard_OutOfRange;
52 class SMDS_ListOfMeshElement;
53 class gp_Vec;
54 class gp_Dir;
55
56
57 class SMDS_MeshElement : public SMDS_MeshObject {
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 inline   Standard_Integer HashCode(const Standard_Integer Upper) const;
80 Standard_EXPORT inline   Standard_Boolean IsSame(const Handle(SMDS_MeshElement)& other) const;
81 Standard_EXPORT inline   Standard_Boolean IsEqual(const Handle(SMDS_MeshElement)& other) const;
82 Standard_EXPORT inline   Standard_Boolean IsNodeInElement(const Standard_Integer idnode) const;
83 Standard_EXPORT virtual  void GetEdgeDefinedByNodes(const Standard_Integer rank,Standard_Integer& idnode1,Standard_Integer& idnode2) const;
84 Standard_EXPORT virtual  void GetFaceDefinedByNodes(const Standard_Integer rank,const Standard_Address idnode,Standard_Integer& nb) const;
85 Standard_EXPORT virtual  Standard_Integer GetConnection(const Standard_Integer rank) const;
86 Standard_EXPORT virtual  void AddInverseElement(const Handle(SMDS_MeshElement)& ME) ;
87 Standard_EXPORT virtual const SMDS_ListOfMeshElement& InverseElements() const;
88 Standard_EXPORT virtual  void ClearInverseElements() ;
89 Standard_EXPORT inline   Standard_Integer NbNodes() const;
90 Standard_EXPORT virtual  Standard_Integer NbEdges() const;
91 Standard_EXPORT virtual  Standard_Integer NbFaces() const;
92 Standard_EXPORT inline   Standard_Integer GetID() const;
93 Standard_EXPORT virtual  Standard_Integer GetKey() const = 0;
94 Standard_EXPORT virtual  void SetNormal(const Standard_Integer rank,const Standard_Real vx,const Standard_Real vy,const Standard_Real vz) ;
95 Standard_EXPORT virtual  void SetNormal(const Standard_Integer rank,const gp_Vec& v) ;
96 Standard_EXPORT virtual  gp_Dir GetNormal(const Standard_Integer rank) ;
97 Standard_EXPORT virtual  void Print(Standard_OStream& OS) const;
98 friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& OS, const Handle(SMDS_MeshElement)& );
99 Standard_EXPORT inline   SMDSAbs_ElementType GetType() const;
100 Standard_EXPORT ~SMDS_MeshElement();
101
102
103
104
105  // Type management
106  //
107  Standard_EXPORT friend Handle_Standard_Type& SMDS_MeshElement_Type_();
108  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
109  Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
110
111 protected:
112
113  // Methods PROTECTED
114  // 
115 Standard_EXPORT SMDS_MeshElement(const Standard_Integer ID,const Standard_Integer NbConnections,const SMDSAbs_ElementType Type);
116 Standard_EXPORT virtual  Standard_Address GetConnections() const;
117
118
119  // Fields PROTECTED
120  //
121 Standard_Integer myID;
122 Standard_Integer myNbNodes;
123 Handle_TColgp_HArray1OfDir myNormals;
124
125
126 private: 
127
128  // Methods PRIVATE
129  // 
130
131
132  // Fields PRIVATE
133  //
134 SMDSAbs_ElementType myType;
135
136
137 };
138
139
140 #include "SMDS_MeshElement.lxx"
141
142
143
144 // other inline functions and methods (like "C++: function call" methods)
145 //
146
147
148 #endif