From d2d6d05d3a04ca990b23d5f020c13ece5981adc3 Mon Sep 17 00:00:00 2001 From: mpa Date: Thu, 3 Jul 2014 16:16:27 +0400 Subject: [PATCH] Porting to new version of OCC --- src/DDS/DDS.h | 3 --- src/DDS/DDS_DicGroup.h | 4 +--- src/DDS/DDS_DicItem.h | 4 +--- src/LightApp/LightApp_SelectionMgr.cxx | 11 +++++----- src/LightApp/LightApp_SelectionMgr.h | 12 +++++------ src/LightApp/LightApp_VTKSelector.cxx | 2 +- src/LightApp/LightApp_VTKSelector.h | 6 +++--- src/OBJECT/SALOME_AISShape.hxx | 6 ++++-- ...taMapIteratorOfDataMapOfIOMapOfInteger.hxx | 6 ++++-- ...MapIteratorOfDataMapOfIOMapOfInteger_0.cxx | 8 ++++---- ...E_DataMapNodeOfDataMapOfIOMapOfInteger.hxx | 15 +++++++------- ...DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx | 8 ++++---- src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx | 14 +++++++------ .../SALOME_DataMapOfIOMapOfInteger_0.cxx | 8 ++++---- src/SOCC/SOCC_ViewModel.cxx | 2 +- src/SVTK/SALOME_Actor.cxx | 16 +++++++-------- src/SVTK/SVTK_Actor.cxx | 8 ++++---- src/SVTK/SVTK_Actor.h | 12 +++++------ src/SVTK/SVTK_InteractorStyle.cxx | 2 +- src/SVTK/SVTK_Selector.cxx | 20 +++++++++---------- src/SVTK/SVTK_Selector.h | 6 +++--- src/SVTK/SVTK_SelectorDef.h | 8 ++++---- .../VTKViewer_RenderWindowInteractor.cxx | 4 ++-- .../VTKViewer_RenderWindowInteractor.h | 14 ++++++------- 24 files changed, 98 insertions(+), 101 deletions(-) diff --git a/src/DDS/DDS.h b/src/DDS/DDS.h index f6530348d..2d59c983d 100644 --- a/src/DDS/DDS.h +++ b/src/DDS/DDS.h @@ -26,7 +26,6 @@ #include #include -#include #define UNIT_SYSTEM_SI "SI" @@ -34,6 +33,4 @@ typedef enum { DDS_MT_OK, DDS_MT_WARNING, DDS_MT_ERROR, DDS_MT_ALARM, DDS_MT_INFO, DDS_MT_NONE } DDS_MsgType; -DEFINE_BASECOLLECTION(DDS_BaseColOfAsciiString,TCollection_AsciiString) - #endif diff --git a/src/DDS/DDS_DicGroup.h b/src/DDS/DDS_DicGroup.h index e8480beb8..5822d8afb 100644 --- a/src/DDS/DDS_DicGroup.h +++ b/src/DDS/DDS_DicGroup.h @@ -92,8 +92,6 @@ public: DEFINE_STANDARD_RTTI(DDS_DicGroup) }; -DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicGroups, Handle(DDS_DicGroup)) -DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicGroups, DDS_BaseCollectionOfDicGroups, - TCollection_AsciiString, Handle(DDS_DicGroup)) +typedef NCollection_IndexedDataMap DDS_IndexedDataMapOfDicGroups; #endif diff --git a/src/DDS/DDS_DicItem.h b/src/DDS/DDS_DicItem.h index fa1f9db9c..a7fbcaeb9 100644 --- a/src/DDS/DDS_DicItem.h +++ b/src/DDS/DDS_DicItem.h @@ -258,8 +258,6 @@ public: DEFINE_STANDARD_HANDLE(DDS_DicItem, MMgt_TShared) -DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicItems, Handle(DDS_DicItem)) -DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicItems, DDS_BaseCollectionOfDicItems, - TCollection_AsciiString, Handle(DDS_DicItem)) +typedef NCollection_IndexedDataMap DDS_IndexedDataMapOfDicItems; #endif diff --git a/src/LightApp/LightApp_SelectionMgr.cxx b/src/LightApp/LightApp_SelectionMgr.cxx index dd304ac14..28384ad67 100644 --- a/src/LightApp/LightApp_SelectionMgr.cxx +++ b/src/LightApp/LightApp_SelectionMgr.cxx @@ -37,7 +37,6 @@ // Open CASCADE Include #include #include - #include #include #endif @@ -262,7 +261,7 @@ void LightApp_SelectionMgr::selectionChanged( SUIT_Selector* theSel ) get map of indexes for the given SALOME_InteractiveObject */ void LightApp_SelectionMgr::GetIndexes( const Handle(SALOME_InteractiveObject)& IObject, - TColStd_IndexedMapOfInteger& theIndex) + NCollection_IndexedMap& theIndex) { theIndex.Clear(); @@ -280,7 +279,7 @@ void LightApp_SelectionMgr::GetIndexes( const Handle(SALOME_InteractiveObject)& /*! get map of indexes for the given entry of SALOME_InteractiveObject */ -void LightApp_SelectionMgr::GetIndexes( const QString& theEntry, TColStd_IndexedMapOfInteger& theIndex ) +void LightApp_SelectionMgr::GetIndexes( const QString& theEntry, NCollection_IndexedMap& theIndex ) { theIndex.Clear(); @@ -343,7 +342,7 @@ void LightApp_SelectionMgr::AddOrRemoveIndex( const Handle(SALOME_InteractiveObj emit currentSelectionChanged(); // Bug 17269: To avoid calling of selected(aList) - //TColStd_IndexedMapOfInteger anIndexes; + //NCollection_IndexedMap anIndexes; //GetIndexes( IObject, anIndexes ); //return !anIndexes.IsEmpty(); } @@ -352,7 +351,7 @@ void LightApp_SelectionMgr::AddOrRemoveIndex( const Handle(SALOME_InteractiveObj select 'subobjects' with given indexes */ void LightApp_SelectionMgr::selectObjects( const Handle(SALOME_InteractiveObject)& IObject, - TColStd_IndexedMapOfInteger theIndex, bool append ) + NCollection_IndexedMap theIndex, bool append ) { SUIT_DataOwnerPtrList aList; @@ -398,7 +397,7 @@ void LightApp_SelectionMgr::selectedSubOwners( MapEntryOfMapOfInteger& theMap ) { theMap.Clear(); - TColStd_IndexedMapOfInteger anIndexes; + NCollection_IndexedMap anIndexes; SUIT_DataOwnerPtrList aList; selected( aList ); diff --git a/src/LightApp/LightApp_SelectionMgr.h b/src/LightApp/LightApp_SelectionMgr.h index a3c6a0d01..4009bc31c 100644 --- a/src/LightApp/LightApp_SelectionMgr.h +++ b/src/LightApp/LightApp_SelectionMgr.h @@ -33,9 +33,9 @@ #include #include #include + #include class SALOME_ListIO; - class TColStd_IndexedMapOfInteger; class TColStd_MapOfInteger; class TCollection_AsciiString; #else @@ -61,16 +61,16 @@ public: virtual void setSelected( const SUIT_DataOwnerPtrList&, const bool = false ); #ifndef DISABLE_SALOMEOBJECT - typedef NCollection_DataMap< Handle(SALOME_InteractiveObject), TColStd_IndexedMapOfInteger > MapIOOfMapOfInteger; - typedef NCollection_DataMap< TCollection_AsciiString, TColStd_IndexedMapOfInteger > MapEntryOfMapOfInteger; + typedef NCollection_DataMap< Handle(SALOME_InteractiveObject), NCollection_IndexedMap > MapIOOfMapOfInteger; + typedef NCollection_DataMap< TCollection_AsciiString, NCollection_IndexedMap > MapEntryOfMapOfInteger; void selectedObjects( SALOME_ListIO&, const QString& = QString(), const bool = true ) const; void setSelectedObjects( const SALOME_ListIO&, const bool = false ); void GetIndexes( const Handle(SALOME_InteractiveObject)& IObject, - TColStd_IndexedMapOfInteger& theIndex ); + NCollection_IndexedMap& theIndex ); void GetIndexes( const QString& theEntry, - TColStd_IndexedMapOfInteger& theIndex ); + NCollection_IndexedMap& theIndex ); //bool AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject, void AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject, @@ -78,7 +78,7 @@ public: bool modeShift ); void selectObjects( const Handle(SALOME_InteractiveObject)& IObject, - TColStd_IndexedMapOfInteger theIndex, bool append ); + NCollection_IndexedMap theIndex, bool append ); void selectObjects( MapIOOfMapOfInteger theMapIO, bool append ); void selectedSubOwners( MapEntryOfMapOfInteger& theMap ); diff --git a/src/LightApp/LightApp_VTKSelector.cxx b/src/LightApp/LightApp_VTKSelector.cxx index 79f9e735a..b3066a71b 100644 --- a/src/LightApp/LightApp_VTKSelector.cxx +++ b/src/LightApp/LightApp_VTKSelector.cxx @@ -77,7 +77,7 @@ LightApp_SVTKDataOwner /*! Gets dataowners ids list. */ -const TColStd_IndexedMapOfInteger& +const NCollection_IndexedMap& LightApp_SVTKDataOwner ::GetIds() const { diff --git a/src/LightApp/LightApp_VTKSelector.h b/src/LightApp/LightApp_VTKSelector.h index 19c12cda6..b9b789adf 100644 --- a/src/LightApp/LightApp_VTKSelector.h +++ b/src/LightApp/LightApp_VTKSelector.h @@ -32,7 +32,7 @@ class SUIT_Desktop; #ifndef DISABLE_VTKVIEWER - #include + #include #include "SVTK_Selection.h" #ifndef DISABLE_SALOMEOBJECT #include "SALOME_InteractiveObject.hxx" @@ -57,7 +57,7 @@ class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner #endif /*!Gets dataowners ids list.*/ - const TColStd_IndexedMapOfInteger& GetIds() const; + const NCollection_IndexedMap& GetIds() const; /*!Gets selection mode.*/ Selection_Mode GetMode() const; @@ -66,7 +66,7 @@ class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner SALOME_Actor* GetActor() const; protected: - mutable TColStd_IndexedMapOfInteger myIds; + mutable NCollection_IndexedMap myIds; SVTK_ViewWindow* GetActiveViewWindow() const; SUIT_Desktop* myDesktop; diff --git a/src/OBJECT/SALOME_AISShape.hxx b/src/OBJECT/SALOME_AISShape.hxx index 0ac9a30d8..57e9486fc 100755 --- a/src/OBJECT/SALOME_AISShape.hxx +++ b/src/OBJECT/SALOME_AISShape.hxx @@ -40,6 +40,9 @@ #ifndef _Handle_SALOME_InteractiveObject_HeaderFile #include #endif +#ifndef NCollection_IndexedMap_HeaderFile +#include +#endif // #ifndef _AIS_Shape_HeaderFile // #include // #endif @@ -55,7 +58,6 @@ class SALOME_InteractiveObject; class TopoDS_Shape; -class TColStd_IndexedMapOfInteger; class SALOME_AISShape : public ViewerData_AISShape { @@ -89,7 +91,7 @@ Standard_EXPORT virtual Standard_Boolean toActivate() = 0; Standard_EXPORT virtual void setTopLevel(Standard_Boolean) = 0; Standard_EXPORT virtual Standard_CString getName() = 0; Standard_EXPORT virtual void setName(const Standard_CString aName) = 0; -Standard_EXPORT virtual void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight ) = 0; +Standard_EXPORT virtual void highlightSubShapes(const NCollection_IndexedMap& aIndexMap, const Standard_Boolean aHighlight ) = 0; Standard_EXPORT ~SALOME_AISShape(); diff --git a/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx b/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx index 74b3372fc..13b24f7c5 100644 --- a/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx +++ b/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx @@ -30,6 +30,9 @@ #ifndef _TCollection_BasicMapIterator_HeaderFile #include #endif +#ifndef NCollection_IndexedMap_HeaderFile +#include +#endif #ifndef _Handle_SALOME_InteractiveObject_HeaderFile #include "Handle_SALOME_InteractiveObject.hxx" #endif @@ -38,7 +41,6 @@ #endif class Standard_NoSuchObject; class SALOME_InteractiveObject; -class TColStd_IndexedMapOfInteger; class TColStd_MapTransientHasher; class SALOME_DataMapOfIOMapOfInteger; class SALOME_DataMapNodeOfDataMapOfIOMapOfInteger; @@ -77,7 +79,7 @@ Standard_EXPORT SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger(); Standard_EXPORT SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger(const SALOME_DataMapOfIOMapOfInteger& aMap); Standard_EXPORT void Initialize(const SALOME_DataMapOfIOMapOfInteger& aMap) ; Standard_EXPORT const Handle_SALOME_InteractiveObject& Key() const; -Standard_EXPORT const TColStd_IndexedMapOfInteger& Value() const; +Standard_EXPORT const NCollection_IndexedMap& Value() const; diff --git a/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx b/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx index c99846b1e..486e091ee 100644 --- a/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx +++ b/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx @@ -32,8 +32,8 @@ #ifndef _SALOME_InteractiveObject_HeaderFile #include "SALOME_InteractiveObject.hxx" #endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include +#ifndef NCollection_IndexedMap_HeaderFile +#include #endif #ifndef _TColStd_MapTransientHasher_HeaderFile #include @@ -47,8 +47,8 @@ #define TheKey Handle_SALOME_InteractiveObject #define TheKey_hxx "SALOME_InteractiveObject.hxx" -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx +#define TheItem NCollection_IndexedMap +#define TheItem_hxx #define Hasher TColStd_MapTransientHasher #define Hasher_hxx #define TCollection_DataMapNode SALOME_DataMapNodeOfDataMapOfIOMapOfInteger diff --git a/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx b/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx index 324ca5531..4742bac11 100644 --- a/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx +++ b/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx @@ -37,8 +37,8 @@ #ifndef _Handle_SALOME_InteractiveObject_HeaderFile #include "Handle_SALOME_InteractiveObject.hxx" #endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include +#ifndef NCollection_IndexedMap_HeaderFile +#include #endif #ifndef _TCollection_MapNode_HeaderFile #include @@ -47,7 +47,6 @@ #include #endif class SALOME_InteractiveObject; -class TColStd_IndexedMapOfInteger; class TColStd_MapTransientHasher; class SALOME_DataMapOfIOMapOfInteger; class SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger; @@ -75,9 +74,9 @@ public: // } // Methods PUBLIC // -Standard_EXPORT inline SALOME_DataMapNodeOfDataMapOfIOMapOfInteger(const Handle(SALOME_InteractiveObject)& K,const TColStd_IndexedMapOfInteger& I,const TCollection_MapNodePtr& n); +Standard_EXPORT inline SALOME_DataMapNodeOfDataMapOfIOMapOfInteger(const Handle(SALOME_InteractiveObject)& K,const NCollection_IndexedMap& I,const TCollection_MapNodePtr& n); Standard_EXPORT inline Handle_SALOME_InteractiveObject& Key() const; -Standard_EXPORT inline TColStd_IndexedMapOfInteger& Value() const; +Standard_EXPORT inline NCollection_IndexedMap& Value() const; Standard_EXPORT ~SALOME_DataMapNodeOfDataMapOfIOMapOfInteger(); @@ -108,15 +107,15 @@ private: // Fields PRIVATE // Handle_SALOME_InteractiveObject myKey; -TColStd_IndexedMapOfInteger myValue; +NCollection_IndexedMap myValue; }; #define TheKey Handle_SALOME_InteractiveObject #define TheKey_hxx "SALOME_InteractiveObject.hxx" -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx +#define TheItem NCollection_IndexedMap +#define TheItem_hxx #define Hasher TColStd_MapTransientHasher #define Hasher_hxx #define TCollection_DataMapNode SALOME_DataMapNodeOfDataMapOfIOMapOfInteger diff --git a/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx b/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx index 329abcf25..8c4972de8 100644 --- a/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx +++ b/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx @@ -33,8 +33,8 @@ #ifndef _SALOME_InteractiveObject_HeaderFile #include "SALOME_InteractiveObject.hxx" #endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include +#ifndef NCollection_IndexedMap_HeaderFile +#include #endif #ifndef _TColStd_MapTransientHasher_HeaderFile #include @@ -116,8 +116,8 @@ Standard_Boolean SALOME_DataMapNodeOfDataMapOfIOMapOfInteger::IsKind(const Handl Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger::~Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger() {} #define TheKey Handle_SALOME_InteractiveObject #define TheKey_hxx "SALOME_InteractiveObject.hxx" -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx +#define TheItem NCollection_IndexedMap +#define TheItem_hxx #define Hasher TColStd_MapTransientHasher #define Hasher_hxx #define TCollection_DataMapNode SALOME_DataMapNodeOfDataMapOfIOMapOfInteger diff --git a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx b/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx index 1cabc85f0..8195828bd 100644 --- a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx +++ b/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx @@ -30,6 +30,9 @@ #ifndef _TCollection_BasicMap_HeaderFile #include #endif +#ifndef NCollection_IndexedMap_HeaderFile +#include +#endif #ifndef _Handle_SALOME_InteractiveObject_HeaderFile #include "Handle_SALOME_InteractiveObject.hxx" #endif @@ -46,7 +49,6 @@ class Standard_DomainError; class Standard_NoSuchObject; class SALOME_InteractiveObject; -class TColStd_IndexedMapOfInteger; class TColStd_MapTransientHasher; class SALOME_DataMapNodeOfDataMapOfIOMapOfInteger; class SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger; @@ -93,17 +95,17 @@ Standard_EXPORT void Clear() ; Clear(); } -Standard_EXPORT Standard_Boolean Bind(const Handle(SALOME_InteractiveObject)& K,const TColStd_IndexedMapOfInteger& I) ; +Standard_EXPORT Standard_Boolean Bind(const Handle(SALOME_InteractiveObject)& K,const NCollection_IndexedMap& I) ; Standard_EXPORT Standard_Boolean IsBound(const Handle(SALOME_InteractiveObject)& K) const; Standard_EXPORT Standard_Boolean UnBind(const Handle(SALOME_InteractiveObject)& K) ; -Standard_EXPORT const TColStd_IndexedMapOfInteger& Find(const Handle(SALOME_InteractiveObject)& K) const; - const TColStd_IndexedMapOfInteger& operator()(const Handle(SALOME_InteractiveObject)& K) const +Standard_EXPORT const NCollection_IndexedMap& Find(const Handle(SALOME_InteractiveObject)& K) const; + const NCollection_IndexedMap& operator()(const Handle(SALOME_InteractiveObject)& K) const { return Find(K); } -Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFind(const Handle(SALOME_InteractiveObject)& K) ; - TColStd_IndexedMapOfInteger& operator()(const Handle(SALOME_InteractiveObject)& K) +Standard_EXPORT NCollection_IndexedMap& ChangeFind(const Handle(SALOME_InteractiveObject)& K) ; +NCollection_IndexedMap& operator()(const Handle(SALOME_InteractiveObject)& K) { return ChangeFind(K); } diff --git a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger_0.cxx b/src/OBJECT/SALOME_DataMapOfIOMapOfInteger_0.cxx index f9152d14a..dfe7dc8a7 100644 --- a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger_0.cxx +++ b/src/OBJECT/SALOME_DataMapOfIOMapOfInteger_0.cxx @@ -35,8 +35,8 @@ #ifndef _SALOME_InteractiveObject_HeaderFile #include "SALOME_InteractiveObject.hxx" #endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include +#ifndef NCollection_IndexedMap_HeaderFile +#include #endif #ifndef _TColStd_MapTransientHasher_HeaderFile #include @@ -50,8 +50,8 @@ #define TheKey Handle_SALOME_InteractiveObject #define TheKey_hxx "SALOME_InteractiveObject.hxx" -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx +#define TheItem NCollection_IndexedMap +#define TheItem_hxx #define Hasher TColStd_MapTransientHasher #define Hasher_hxx #define TCollection_DataMapNode SALOME_DataMapNodeOfDataMapOfIOMapOfInteger diff --git a/src/SOCC/SOCC_ViewModel.cxx b/src/SOCC/SOCC_ViewModel.cxx index 25fdb6547..20dc64995 100755 --- a/src/SOCC/SOCC_ViewModel.cxx +++ b/src/SOCC/SOCC_ViewModel.cxx @@ -133,7 +133,7 @@ bool SOCC_Viewer::highlight( const Handle(SALOME_InteractiveObject)& obj, /*if ( ite.Value()->IsKind( STANDARD_TYPE( SALOME_AISShape ) ) ) { Handle(SALOME_AISShape) aSh = Handle(SALOME_AISShape)::DownCast( ite.Value() ); - TColStd_IndexedMapOfInteger MapIndex; + NCollection_IndexedMap MapIndex; Sel->GetIndex( IObject, MapIndex ); aSh->highlightSubShapes( MapIndex, highlight ); }*/ diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index 20fafbeae..36e437018 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -66,7 +66,7 @@ #include #include -#include +#include #include #include @@ -445,7 +445,7 @@ SALOME_Actor if(mySelector.GetPointer()){ if(mySelectionMode != ActorSelection){ - TColStd_IndexedMapOfInteger aMapIndex; + NCollection_IndexedMap aMapIndex; mySelector->GetIndex( getIO(), aMapIndex ); switch( mySelectionMode ){ case NodeSelection: @@ -540,11 +540,11 @@ SALOME_Actor int anObjId = GetNodeObjId( aVtkId ); myIsPreselected = (anObjId >= 0); if(myIsPreselected){ - const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex(); + const NCollection_IndexedMap& aMapIndex = myPreHighlightActor->GetMapIndex(); int anExtent = aMapIndex.Extent(); anIsChanged |= (anExtent == 0 || (anExtent > 0 && anObjId != aMapIndex(1))); if(anIsChanged){ - TColStd_IndexedMapOfInteger aMapIndex; + NCollection_IndexedMap aMapIndex; aMapIndex.Add( anObjId ); myPreHighlightActor->GetProperty()->SetRepresentationToPoints(); @@ -571,11 +571,11 @@ SALOME_Actor if ( anObjId >= 0 ) { myIsPreselected = CheckDimensionId(aSelectionMode,this,anObjId); if(myIsPreselected){ - const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex(); + const NCollection_IndexedMap& aMapIndex = myPreHighlightActor->GetMapIndex(); int anExtent = aMapIndex.Extent(); anIsChanged |= (anExtent == 0 || (anExtent > 0 && anObjId != aMapIndex(1))); if(anIsChanged){ - TColStd_IndexedMapOfInteger aMapIndex; + NCollection_IndexedMap aMapIndex; aMapIndex.Add( anObjId ); myPreHighlightActor->GetProperty()->SetRepresentationToSurface(); @@ -599,12 +599,12 @@ SALOME_Actor int anEdgeId = GetEdgeId(this,myCellPicker.GetPointer(),anObjId); myIsPreselected = anEdgeId < 0; if(myIsPreselected){ - const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex(); + const NCollection_IndexedMap& aMapIndex = myPreHighlightActor->GetMapIndex(); int anExtent = aMapIndex.Extent(); anIsChanged |= (anExtent == 0 || anExtent == 1); anIsChanged |= (anExtent == 2 && (anObjId != aMapIndex(1) || anEdgeId != aMapIndex(2))); if(anIsChanged){ - TColStd_IndexedMapOfInteger aMapIndex; + NCollection_IndexedMap aMapIndex; aMapIndex.Add( anObjId ); aMapIndex.Add( anEdgeId ); diff --git a/src/SVTK/SVTK_Actor.cxx b/src/SVTK/SVTK_Actor.cxx index e13b0350b..d311dcbbe 100644 --- a/src/SVTK/SVTK_Actor.cxx +++ b/src/SVTK/SVTK_Actor.cxx @@ -96,7 +96,7 @@ SVTK_Actor { } -const TColStd_IndexedMapOfInteger& +const NCollection_IndexedMap& SVTK_Actor ::GetMapIndex() const { @@ -106,7 +106,7 @@ SVTK_Actor void SVTK_Actor ::MapCells(SALOME_Actor* theMapActor, - const TColStd_IndexedMapOfInteger& theMapIndex) + const NCollection_IndexedMap& theMapIndex) { myUnstructuredGrid->Initialize(); myUnstructuredGrid->Allocate(); @@ -148,7 +148,7 @@ SVTK_Actor void SVTK_Actor ::MapPoints(SALOME_Actor* theMapActor, - const TColStd_IndexedMapOfInteger& theMapIndex) + const NCollection_IndexedMap& theMapIndex) { myUnstructuredGrid->Initialize(); myUnstructuredGrid->Allocate(); @@ -177,7 +177,7 @@ SVTK_Actor void SVTK_Actor ::MapEdge(SALOME_Actor* theMapActor, - const TColStd_IndexedMapOfInteger& theMapIndex) + const NCollection_IndexedMap& theMapIndex) { myUnstructuredGrid->Initialize(); myUnstructuredGrid->Allocate(); diff --git a/src/SVTK/SVTK_Actor.h b/src/SVTK/SVTK_Actor.h index 7beebf4b7..fd6fa11bc 100644 --- a/src/SVTK/SVTK_Actor.h +++ b/src/SVTK/SVTK_Actor.h @@ -23,7 +23,7 @@ #ifndef SVTK_ACTOR_H #define SVTK_ACTOR_H -#include +#include class vtkRenderer; class vtkShrinkFilter; @@ -71,23 +71,23 @@ public: //! Allow to recostruct selected cells from source SALOME_Actor and map of subindexes virtual void MapCells(SALOME_Actor* theMapActor, - const TColStd_IndexedMapOfInteger& theMapIndex); + const NCollection_IndexedMap& theMapIndex); //! Allow to recostruct selected points from source SALOME_Actor and map of subindexes virtual void MapPoints(SALOME_Actor* theMapActor, - const TColStd_IndexedMapOfInteger& theMapIndex); + const NCollection_IndexedMap& theMapIndex); //! Allow to recostruct selected edges from source SALOME_Actor and map of subindexes virtual void MapEdge(SALOME_Actor* theMapActor, - const TColStd_IndexedMapOfInteger& theMapIndex); + const NCollection_IndexedMap& theMapIndex); - const TColStd_IndexedMapOfInteger& + const NCollection_IndexedMap& GetMapIndex() const; protected: - TColStd_IndexedMapOfInteger myMapIndex; + NCollection_IndexedMap myMapIndex; vtkSmartPointer myUnstructuredGrid; diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 6bb805359..a5b87636e 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -1368,7 +1368,7 @@ void SVTK_InteractorStyle::onCursorMove(QPoint mousePos) if ( aVtkId >= 0 ) { int anObjId = anActor->GetNodeObjId( aVtkId ); - TColStd_IndexedMapOfInteger aMapIndex; + NCollection_IndexedMap aMapIndex; aMapIndex.Add( anObjId ); myHighlightSelectionPointActor->MapPoints( anActor, aMapIndex ); diff --git a/src/SVTK/SVTK_Selector.cxx b/src/SVTK/SVTK_Selector.cxx index 781292235..4effefedc 100644 --- a/src/SVTK/SVTK_Selector.cxx +++ b/src/SVTK/SVTK_Selector.cxx @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include @@ -271,7 +271,7 @@ SVTK_SelectorDef void SVTK_SelectorDef ::GetIndex( const Handle(SALOME_InteractiveObject)& theIO, - TColStd_IndexedMapOfInteger& theIndex) + NCollection_IndexedMap& theIndex) { TMapIOSubIndex::const_iterator anIter = myMapIOSubIndex.find(theIO); if(anIter != myMapIOSubIndex.end()) @@ -292,14 +292,14 @@ SVTK_SelectorDef { TMapIOSubIndex::const_iterator anIter = myMapIOSubIndex.find(theIO); if(anIter != myMapIOSubIndex.end()){ - const TColStd_IndexedMapOfInteger& aMapIndex = anIter->second.myMap; + const NCollection_IndexedMap& aMapIndex = anIter->second.myMap; return aMapIndex.Contains( theIndex ) == Standard_True; } return false; } -static bool removeIndex(TColStd_IndexedMapOfInteger& theMapIndex, const int theIndex) +static bool removeIndex(NCollection_IndexedMap& theMapIndex, const int theIndex) { int anId = theMapIndex.FindIndex(theIndex); // i==0 if Index is not in the MapIndex if(anId){ @@ -308,7 +308,7 @@ static bool removeIndex(TColStd_IndexedMapOfInteger& theMapIndex, const int theI if(aLastId == anId) theMapIndex.RemoveLast(); else{ - TColStd_IndexedMapOfInteger aNewMap; + NCollection_IndexedMap aNewMap; aNewMap.ReSize(theMapIndex.Extent()-1); for(int j = 1; j <= theMapIndex.Extent(); j++){ int anIndex = theMapIndex(j); @@ -330,7 +330,7 @@ static bool removeIndex(TColStd_IndexedMapOfInteger& theMapIndex, const int theI bool SVTK_SelectorDef ::AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, - const TColStd_IndexedMapOfInteger& theIndices, + const NCollection_IndexedMap& theIndices, bool theIsModeShift) { TMapIOSubIndex::iterator aMapIter = myMapIOSubIndex.find(theIO); @@ -339,7 +339,7 @@ SVTK_SelectorDef aMapIter = myMapIOSubIndex. insert(TMapIOSubIndex::value_type(theIO,anEmpty)).first; } - TColStd_IndexedMapOfInteger& aMapIndex = aMapIter->second.myMap; + NCollection_IndexedMap& aMapIndex = aMapIter->second.myMap; if(!theIsModeShift) aMapIndex.Clear(); @@ -374,7 +374,7 @@ SVTK_SelectorDef aMapIter = myMapIOSubIndex. insert(TMapIOSubIndex::value_type(theIO,anEmpty)).first; } - TColStd_IndexedMapOfInteger& aMapIndex = aMapIter->second.myMap; + NCollection_IndexedMap& aMapIndex = aMapIter->second.myMap; if(!theIsModeShift) aMapIndex.Clear(); @@ -410,7 +410,7 @@ SVTK_SelectorDef anIter = myMapIOSubIndex. insert(TMapIOSubIndex::value_type(theIO,anEmpty)).first; } - TColStd_IndexedMapOfInteger& aMapIndex = anIter->second.myMap; + NCollection_IndexedMap& aMapIndex = anIter->second.myMap; bool anIsConatains = aMapIndex.Contains( theIndex ) == Standard_True; if ( anIsConatains ) @@ -441,7 +441,7 @@ SVTK_SelectorDef { if(IsIndexSelected(theIO,theIndex)){ TMapIOSubIndex::iterator anIter = myMapIOSubIndex.find(theIO); - TColStd_IndexedMapOfInteger& aMapIndex = anIter->second.myMap; + NCollection_IndexedMap& aMapIndex = anIter->second.myMap; removeIndex(aMapIndex,theIndex); } } diff --git a/src/SVTK/SVTK_Selector.h b/src/SVTK/SVTK_Selector.h index 7728375ee..e60867021 100644 --- a/src/SVTK/SVTK_Selector.h +++ b/src/SVTK/SVTK_Selector.h @@ -32,7 +32,7 @@ #include "SALOME_ListIO.hxx" #include -#include +#include #include @@ -128,13 +128,13 @@ public: virtual void GetIndex( const Handle(SALOME_InteractiveObject)& theIO, - TColStd_IndexedMapOfInteger& theIndex ) = 0; + NCollection_IndexedMap& theIndex ) = 0; //! Change indices of subselection for given #SALOME_InteractiveObject virtual bool AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, - const TColStd_IndexedMapOfInteger& theIndices, + const NCollection_IndexedMap& theIndices, bool theIsModeShift) = 0; //! Change indexes of subslection for given #SALOME_InteractiveObject diff --git a/src/SVTK/SVTK_SelectorDef.h b/src/SVTK/SVTK_SelectorDef.h index aebc000a9..1915f24bd 100644 --- a/src/SVTK/SVTK_SelectorDef.h +++ b/src/SVTK/SVTK_SelectorDef.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include @@ -106,12 +106,12 @@ public: virtual void GetIndex( const Handle(SALOME_InteractiveObject)& theIO, - TColStd_IndexedMapOfInteger& theIndex ); + NCollection_IndexedMap& theIndex ); virtual bool AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, - const TColStd_IndexedMapOfInteger& theIndices, + const NCollection_IndexedMap& theIndices, bool theIsModeShift); virtual bool @@ -219,7 +219,7 @@ private: struct TIndexedMapOfInteger { - TColStd_IndexedMapOfInteger myMap; + NCollection_IndexedMap myMap; TIndexedMapOfInteger() {} TIndexedMapOfInteger(const TIndexedMapOfInteger& theIndexedMapOfInteger) diff --git a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx index 1bb26734c..b32c0edda 100755 --- a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx +++ b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx @@ -679,7 +679,7 @@ bool VTKViewer_RenderWindowInteractor::unHighlightAll(){ * else sets visibility to false. * \li Emit render window modified, if flag \a update - true. */ -bool VTKViewer_RenderWindowInteractor::highlight(const TColStd_IndexedMapOfInteger& theMapIndex, +bool VTKViewer_RenderWindowInteractor::highlight(const NCollection_IndexedMap& theMapIndex, VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor, TUpdateActor theFun, bool hilight, bool update) { @@ -702,7 +702,7 @@ bool VTKViewer_RenderWindowInteractor::highlight(const TColStd_IndexedMapOfInteg } /*!Sets actors data.*/ -void VTKViewer_RenderWindowInteractor::setActorData(const TColStd_IndexedMapOfInteger& theMapIndex, +void VTKViewer_RenderWindowInteractor::setActorData(const NCollection_IndexedMap& theMapIndex, VTKViewer_Actor * theMapActor, VTKViewer_Actor * theActor, TUpdateActor theFun) diff --git a/src/VTKViewer/VTKViewer_RenderWindowInteractor.h b/src/VTKViewer/VTKViewer_RenderWindowInteractor.h index 91557d5b7..dce270255 100755 --- a/src/VTKViewer/VTKViewer_RenderWindowInteractor.h +++ b/src/VTKViewer/VTKViewer_RenderWindowInteractor.h @@ -36,7 +36,7 @@ class QContextMenuEvent; // Open CASCADE Includes #include #include -#include +#include class vtkPicker; class vtkCellPicker; @@ -104,15 +104,15 @@ public: /** @name Selection Management */ //@{ - bool highlightCell(const TColStd_IndexedMapOfInteger& MapIndex, + bool highlightCell(const NCollection_IndexedMap& MapIndex, VTKViewer_Actor* theMapActor, bool hilight, bool update = true ); - bool highlightEdge(const TColStd_IndexedMapOfInteger& MapIndex, + bool highlightEdge(const NCollection_IndexedMap& MapIndex, VTKViewer_Actor* theMapActor, bool hilight, bool update = true ); - bool highlightPoint(const TColStd_IndexedMapOfInteger& MapIndex, + bool highlightPoint(const NCollection_IndexedMap& MapIndex, VTKViewer_Actor* theMapActor, bool hilight, bool update = true ); @@ -174,7 +174,7 @@ public: VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor) {} - typedef void (*TUpdateActor)(const TColStd_IndexedMapOfInteger& theMapIndex, + typedef void (*TUpdateActor)(const NCollection_IndexedMap& theMapIndex, VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor); protected: @@ -184,10 +184,10 @@ public: VTKViewer_InteractorStyle* myInteractorStyle; - bool highlight(const TColStd_IndexedMapOfInteger& theMapIndex, + bool highlight(const NCollection_IndexedMap& theMapIndex, VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor, TUpdateActor theFun, bool hilight, bool update); - void setActorData(const TColStd_IndexedMapOfInteger& theMapIndex, + void setActorData(const NCollection_IndexedMap& theMapIndex, VTKViewer_Actor* theMapActor, VTKViewer_Actor *theActor, TUpdateActor theFun); -- 2.39.2