27#ifndef __SMESH_TypeDefs_HXX__
28#define __SMESH_TypeDefs_HXX__
30#include <Basics_OCCTVersion.hxx>
37#include <smIdType.hxx>
41#include <NCollection_Sequence.hxx>
48#include <boost/make_shared.hpp>
61typedef std::pair< const SMDS_MeshNode*, const SMDS_MeshNode* >
NLink;
72 template <
class TVECTOR>
78 template <
class TVECTOR>
88 template <
typename TOBJ>
104 template <
typename TOBJ>
110 operator TOBJ*() {
return _obj; }
119 template <
class ELEM_SET >
123 <
SMDS_pElement,
typename ELEM_SET::const_iterator> TSetIterator;
124 return boost::make_shared< TSetIterator >( elements.begin(), elements.end() );
130 template <
typename ENUM >
133 v = ENUM(
int(v)+delta );
139 template <
typename ENUM >
140 ENUM
Add( ENUM v,
int delta )
142 return ENUM(
int(v)+delta );
155 {
if ( n1->
GetID() < n2->
GetID() ) std::swap( first, second ); }
157 {
if ( first->GetID() < second->GetID() ) std::swap( first, second ); }
174#if OCC_VERSION_LARGE < 0x07080000
231 void SetXYZ(
const gp_XYZ& p ) { SetCoord( p.X(), p.Y(), p.Z() ); }
247#if OCC_VERSION_LARGE < 0x07080000
250 return smIdHasher::HashCode( e->
GetID(), upper );
259 return smIdHasher()( e->
GetID() );
284 inline gp_XY
UV()
const {
return gp_XY(
u,
v ); }
285 inline void SetUV(
const gp_XY& uv ) {
u = uv.X();
v = uv.Y(); }
@ SMDSAbs_Node
Definition: SMDSAbs_ElementType.hxx:36
boost::shared_ptr< SMDS_Iterator< const SMDS_MeshElement * > > SMDS_ElemIteratorPtr
Definition: SMDS_ElemIterator.hxx:43
const SMDS_MeshElement * SMDS_pElement
Definition: SMDS_SetIterator.hxx:188
SMESH_TNodeXYZ SMESH_NodeXYZ
Definition: SMESH_TypeDefs.hxx:240
boost::shared_ptr< FaceQuadStruct > TFaceQuadStructPtr
Definition: SMESH_TypeDefs.hxx:64
NCollection_Sequence< SMDS_MeshNodePtr > SMESH_SequenceOfNode
Definition: SMESH_TypeDefs.hxx:305
std::map< const SMDS_MeshElement *, std::list< const SMDS_MeshNode * >, TIDCompare > TElemOfNodeListMap
Definition: SMESH_TypeDefs.hxx:53
SMESH_TLink SMESH_Link
Definition: SMESH_TypeDefs.hxx:194
std::map< const SMDS_MeshNode *, const SMDS_MeshNode *, TIDCompare > TNodeNodeMap
Set of elements sorted by ID, to be used to assure predictability of edition.
Definition: SMESH_TypeDefs.hxx:55
std::set< const SMDS_MeshNode *, TIDCompare > TIDSortedNodeSet
Definition: SMESH_TypeDefs.hxx:59
std::pair< const SMDS_MeshNode *, const SMDS_MeshNode * > NLink
Definition: SMESH_TypeDefs.hxx:61
std::map< const SMDS_MeshElement *, std::list< const SMDS_MeshElement * >, TIDCompare > TElemOfElemListMap
Definition: SMESH_TypeDefs.hxx:51
struct uvPtStruct UVPtStruct
Data of a node generated on FACE boundary.
const SMDS_MeshNode * SMDS_MeshNodePtr
Definition: SMESH_TypeDefs.hxx:304
std::set< const SMDS_MeshElement *, TIDCompare > TIDSortedElemSet
Definition: SMESH_TypeDefs.hxx:58
std::vector< UVPtStruct > UVPtStructVec
Definition: SMESH_TypeDefs.hxx:294
std::vector< const SMDS_MeshElement * > SMESH_SequenceOfElemPtr
Definition: SMESH_TypeDefs.hxx:299
Base class for elements.
Definition: SMDS_MeshElement.hxx:56
virtual smIdType GetID() const
Return ID of an element.
Definition: SMDS_MeshElement.cxx:108
Definition: SMDS_MeshNode.hxx:36
void GetXYZ(double xyz[3]) const
thread safe getting coords
Definition: SMDS_MeshNode.cxx:241
SMDS_Iterator iterating over abstract set of values like STL containers.
Definition: SMDS_SetIterator.hxx:88
Definition: SMESH_BoostTxtArchive.hxx:35
void FreeVector(TVECTOR &vec)
Enforce freeing memory allocated by std::vector.
Definition: SMESH_TypeDefs.hxx:73
SMDS_ElemIteratorPtr elemSetIterator(const ELEM_SET &elements)
Definition: SMESH_TypeDefs.hxx:120
ENUM Add(ENUM v, int delta)
Return incremented enum value.
Definition: SMESH_TypeDefs.hxx:140
void CompactVector(TVECTOR &vec)
Definition: SMESH_TypeDefs.hxx:79
void Increment(ENUM &v, int delta=1)
Increment enum value.
Definition: SMESH_TypeDefs.hxx:131
Definition: StdMeshers_Quadrangle_2D.hxx:50
Auto pointer to array.
Definition: SMESH_TypeDefs.hxx:106
ArrayDeleter(const ArrayDeleter &)
TOBJ * _obj
Definition: SMESH_TypeDefs.hxx:107
TOBJ * get()
Definition: SMESH_TypeDefs.hxx:111
ArrayDeleter(TOBJ *obj)
Definition: SMESH_TypeDefs.hxx:108
~ArrayDeleter()
Definition: SMESH_TypeDefs.hxx:109
Auto pointer.
Definition: SMESH_TypeDefs.hxx:90
TOBJ * _obj
Definition: SMESH_TypeDefs.hxx:91
~Deleter()
Definition: SMESH_TypeDefs.hxx:93
TOBJ * operator->() const
Definition: SMESH_TypeDefs.hxx:95
Deleter(TOBJ *obj=(TOBJ *) NULL)
Definition: SMESH_TypeDefs.hxx:92
TOBJ & operator*() const
Definition: SMESH_TypeDefs.hxx:94
Definition: SMESH_TypeDefs.hxx:246
static Standard_Boolean IsEqual(const SMDS_MeshElement *e1, const SMDS_MeshElement *e2)
Definition: SMESH_TypeDefs.hxx:252
static Standard_Integer HashCode(const SMDS_MeshElement *e, const Standard_Integer upper)
Definition: SMESH_TypeDefs.hxx:248
SMESH_TLink knowing its orientation.
Definition: SMESH_TypeDefs.hxx:203
SMESH_OrientedLink(const SMDS_MeshNode *n1, const SMDS_MeshNode *n2)
Definition: SMESH_TypeDefs.hxx:205
bool _reversed
Definition: SMESH_TypeDefs.hxx:204
Definition: SMESH_TypeDefs.hxx:173
static int HashCode(const SMESH_TLink &link, int aLimit)
Definition: SMESH_TypeDefs.hxx:175
static Standard_Boolean IsEqual(const SMESH_TLink &l1, const SMESH_TLink &l2)
Definition: SMESH_TypeDefs.hxx:179
A sorted pair of nodes.
Definition: SMESH_TypeDefs.hxx:153
const SMDS_MeshNode * node2() const
Definition: SMESH_TypeDefs.hxx:159
const SMDS_MeshNode * node1() const
Definition: SMESH_TypeDefs.hxx:158
SMESH_TLink(const NLink &link)
Definition: SMESH_TypeDefs.hxx:156
SMESH_TLink(const SMDS_MeshNode *n1, const SMDS_MeshNode *n2)
Definition: SMESH_TypeDefs.hxx:154
SMDS_MeshNode -> gp_XYZ converter.
Definition: SMESH_TypeDefs.hxx:215
SMESH_TNodeXYZ(const SMDS_MeshElement *e=0)
Definition: SMESH_TypeDefs.hxx:217
const SMDS_MeshNode * Node() const
Definition: SMESH_TypeDefs.hxx:232
double Distance(const SMDS_MeshNode *n) const
Definition: SMESH_TypeDefs.hxx:233
bool operator!() const
Definition: SMESH_TypeDefs.hxx:237
double SquareDistance(const SMDS_MeshNode *n) const
Definition: SMESH_TypeDefs.hxx:234
const SMDS_MeshNode * operator->() const
Definition: SMESH_TypeDefs.hxx:238
bool operator!=(const SMESH_TNodeXYZ &other) const
Definition: SMESH_TypeDefs.hxx:236
bool Set(const SMDS_MeshElement *e=0)
Definition: SMESH_TypeDefs.hxx:221
void SetXYZ(const gp_XYZ &p)
Definition: SMESH_TypeDefs.hxx:231
const SMDS_MeshNode * _node
Definition: SMESH_TypeDefs.hxx:216
bool operator==(const SMESH_TNodeXYZ &other) const
Definition: SMESH_TypeDefs.hxx:235
Definition: SMDS_MeshElement.hxx:209
Definition: SMESH_TypeDefs.hxx:288
static const SMDS_MeshNode * value(std::vector< uvPtStruct >::const_iterator it)
Definition: SMESH_TypeDefs.hxx:289
Data of a node generated on FACE boundary.
Definition: SMESH_TypeDefs.hxx:275
uvPtStruct(const SMDS_MeshNode *n=0)
Definition: SMESH_TypeDefs.hxx:282
double param
Definition: SMESH_TypeDefs.hxx:276
double y
Definition: SMESH_TypeDefs.hxx:279
double normParam
Definition: SMESH_TypeDefs.hxx:277
double u
Definition: SMESH_TypeDefs.hxx:278
double x
Definition: SMESH_TypeDefs.hxx:279
const SMDS_MeshNode * node
Definition: SMESH_TypeDefs.hxx:280
gp_XY UV() const
Definition: SMESH_TypeDefs.hxx:284
double v
Definition: SMESH_TypeDefs.hxx:278
void SetUV(const gp_XY &uv)
Definition: SMESH_TypeDefs.hxx:285