Skip to content

Commit

Permalink
Adapt SMESH to new OCCT NCollection templates
Browse files Browse the repository at this point in the history
  • Loading branch information
5263 authored and wwmayer committed Jul 19, 2014
1 parent 6843d6a commit f7193ca
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 6 deletions.
Expand Up @@ -26,12 +26,17 @@
#ifndef SMESH_IndexedMapOfShape_HeaderFile
#define SMESH_IndexedMapOfShape_HeaderFile

#include "Standard_Version.hxx"
#include "SMESH_SMESH.hxx"

#include "SMESHDS_DataMapOfShape.hxx"

#ifndef __BORLANDC__
#if OCC_VERSION_HEX >= 0x060703
#include <NCollection_IndexedMap.hxx>
#else
#include <NCollection_DefineIndexedMap.hxx>
#endif
#else
#include <SMESH_DefineIndexedMap.hxx>
#endif
Expand All @@ -40,27 +45,42 @@

/// Class SMESH_IndexedMapOfShape

DEFINE_BASECOLLECTION (SMESH_BaseCollectionShape, TopoDS_Shape)

#if OCC_VERSION_HEX >= 0x060703
#ifndef __BORLANDC__
DEFINE_INDEXEDMAP (SMESH_IndexedMapOfShape, SMESH_BaseCollectionShape, TopoDS_Shape)
typedef NCollection_IndexedMap<TopoDS_Shape> SMESH_IndexedMapOfShape;
#else
DEFINE_BASECOLLECTION (SMESH_BaseCollectionShape, TopoDS_Shape)
SMESH_DEFINE_INDEXEDMAP (SMESH_IndexedMapOfShape, SMESH_BaseCollectionShape, TopoDS_Shape)
#endif
#else
DEFINE_INDEXEDMAP (SMESH_IndexedMapOfShape, SMESH_BaseCollectionShape, TopoDS_Shape)
#endif



#endif
#endif

#ifndef SMESH_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
#define SMESH_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile

#if OCC_VERSION_HEX >= 0x060703
#include <NCollection_IndexedDataMap.hxx>
#else
#include <NCollection_DefineIndexedDataMap.hxx>
#endif

/// Class SMESH_IndexedDataMapOfShapeIndexedMapOfShape


#if OCC_VERSION_HEX >= 0x060703
typedef NCollection_IndexedDataMap<SMESH_IndexedMapOfShape,TopoDS_Shape> SMESH_IndexedDataMapOfShapeIndexedMapOfShape;
#else
#include <NCollection_DefineIndexedDataMap.hxx>
/// Class SMESH_IndexedDataMapOfShapeIndexedMapOfShape
DEFINE_BASECOLLECTION (SMESH_BaseCollectionIndexedMapOfShape, SMESH_IndexedMapOfShape)
DEFINE_INDEXEDDATAMAP (SMESH_IndexedDataMapOfShapeIndexedMapOfShape,
SMESH_BaseCollectionIndexedMapOfShape, TopoDS_Shape,
SMESH_IndexedMapOfShape)
#endif
#endif
2 changes: 2 additions & 0 deletions src/3rdParty/salomesmesh/inc/SMESH_MeshEditor.hxx
Expand Up @@ -28,6 +28,8 @@
#ifndef SMESH_MeshEditor_HeaderFile
#define SMESH_MeshEditor_HeaderFile

#include "Standard_Version.hxx"

#include "SMESH_SMESH.hxx"

#include "SMDS_MeshElement.hxx"
Expand Down
8 changes: 8 additions & 0 deletions src/3rdParty/salomesmesh/inc/SMESH_SequenceOfElemPtr.hxx
Expand Up @@ -28,13 +28,21 @@

#include "SMESH_SMESH.hxx"

#if OCC_VERSION_HEX >= 0x060703
#include <NCollection_Sequence.hxx>
#else
#include <NCollection_DefineSequence.hxx>
#endif

#include <SMDS_MeshElement.hxx>

typedef const SMDS_MeshElement* SMDS_MeshElementPtr;

#if OCC_VERSION_HEX >= 0x060703
typedef NCollection_Sequence<SMDS_MeshElementPtr> SMESH_SequenceOfElemPtr;
#else
DEFINE_BASECOLLECTION (SMESH_BaseCollectionElemPtr, SMDS_MeshElementPtr)
DEFINE_SEQUENCE (SMESH_SequenceOfElemPtr, SMESH_BaseCollectionElemPtr, SMDS_MeshElementPtr)
#endif

#endif
9 changes: 8 additions & 1 deletion src/3rdParty/salomesmesh/inc/SMESH_SequenceOfNode.hxx
Expand Up @@ -29,12 +29,19 @@
#include "SMESH_SMESH.hxx"

#include <NCollection_DefineSequence.hxx>
#if OCC_VERSION_HEX >= 0x060703
#include <NCollection_IncAllocator.hxx>
#include <NCollection_Sequence.hxx>
#endif

typedef const SMDS_MeshNode* SMDS_MeshNodePtr;

#if OCC_VERSION_HEX >= 0x060703
typedef NCollection_Sequence<SMDS_MeshNodePtr> SMESH_SequenceOfNode;
#else
DEFINE_BASECOLLECTION (SMESH_BaseCollectionNodePtr, SMDS_MeshNodePtr)
DEFINE_SEQUENCE(SMESH_SequenceOfNode,
SMESH_BaseCollectionNodePtr, SMDS_MeshNodePtr)

#endif

#endif
Expand Up @@ -66,12 +66,17 @@
#ifndef StdMeshers_Array2OfNode_HeaderFile
#define StdMeshers_Array2OfNode_HeaderFile
typedef const SMDS_MeshNode* SMDS_MeshNodePtr;
DEFINE_BASECOLLECTION (StdMeshers_BaseCollectionNodePtr, SMDS_MeshNodePtr)

#ifndef __BORLANDC__
#if OCC_VERSION_HEX >= 0x060703
typedef NCollection_Array2<SMDS_MeshNodePtr> StdMeshers_Array2OfNode;
#else
DEFINE_BASECOLLECTION (StdMeshers_BaseCollectionNodePtr, SMDS_MeshNodePtr)
DEFINE_ARRAY2(StdMeshers_Array2OfNode,
StdMeshers_BaseCollectionNodePtr, SMDS_MeshNodePtr)
StdMeshers_BaseCollectionNodePtr, SMDS_MeshNodePtr)
#endif
#else
DEFINE_BASECOLLECTION (StdMeshers_BaseCollectionNodePtr, SMDS_MeshNodePtr)
SMESH_DEFINE_ARRAY2(StdMeshers_Array2OfNode,
StdMeshers_BaseCollectionNodePtr, SMDS_MeshNodePtr)
#endif
Expand Down

0 comments on commit f7193ca

Please sign in to comment.