Salome HOME
bos #20256: [CEA 18523] Porting SMESH to int 64 bits
[modules/gui.git] / src / SVTK / SVTK_Selector.cxx
index 02840da43ebbe214203c5e5618050ddbec188e47..6eff6187a3c3f0d7679907706e5548129e435142 100644 (file)
@@ -273,7 +273,7 @@ SVTK_SelectorDef
 void 
 SVTK_SelectorDef
 ::GetIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-            TColStd_IndexedMapOfInteger& theIndex)
+            SVTK_TIndexedMapOfVtkId& theIndex)
 {
   TMapIOSubIndex::const_iterator anIter = myMapIOSubIndex.find(theIO);
   if(anIter != myMapIOSubIndex.end())
@@ -294,14 +294,14 @@ SVTK_SelectorDef
 {
   TMapIOSubIndex::const_iterator anIter = myMapIOSubIndex.find(theIO);
   if(anIter != myMapIOSubIndex.end()){
-    const TColStd_IndexedMapOfInteger& aMapIndex = anIter->second.myMap;
+    const SVTK_TIndexedMapOfVtkId& aMapIndex = anIter->second.myMap;
     return aMapIndex.Contains( theIndex ) == Standard_True;
   }
 
   return false;
 }
 
-static bool removeIndex(TColStd_IndexedMapOfInteger& theMapIndex, const int theIndex)
+static bool removeIndex(SVTK_TIndexedMapOfVtkId& theMapIndex, const int theIndex)
 {
   int anId = theMapIndex.FindIndex(theIndex); // i==0 if Index is not in the MapIndex
   if(anId){
@@ -310,7 +310,7 @@ static bool removeIndex(TColStd_IndexedMapOfInteger& theMapIndex, const int theI
     if(aLastId == anId)
       theMapIndex.RemoveLast();
     else{
-      TColStd_IndexedMapOfInteger aNewMap;
+      SVTK_TIndexedMapOfVtkId aNewMap;
       aNewMap.ReSize(theMapIndex.Extent()-1);
       for(int j = 1; j <= theMapIndex.Extent(); j++){
         int anIndex = theMapIndex(j);
@@ -323,19 +323,19 @@ static bool removeIndex(TColStd_IndexedMapOfInteger& theMapIndex, const int theI
   return anId != 0;
 }
 
-static bool removeCompositeIndex( SVTK_IndexedMapOfIds& theMapIndex, const SVTK_ListOfInteger theIds )
+static bool removeCompositeIndex( SVTK_IndexedMapOfVtkIds& theMapIndex, const SVTK_ListOfVtk theIds )
 {
   int anId = theMapIndex.FindIndex( theIds ); // i==0 if Index is not in the MapIndex
   if( anId ) {
     // only the last key can be removed
-    SVTK_ListOfInteger aLastIds = theMapIndex.FindKey( theMapIndex.Extent() );
+    SVTK_ListOfVtk aLastIds = theMapIndex.FindKey( theMapIndex.Extent() );
     if( aLastIds == theIds )
       theMapIndex.RemoveLast();
     else {
-      SVTK_IndexedMapOfIds aNewMap;
+      SVTK_IndexedMapOfVtkIds aNewMap;
       aNewMap.ReSize(theMapIndex.Extent()-1);
       for( int j = 1; j <= theMapIndex.Extent(); j++ ){
-        SVTK_ListOfInteger anIds = theMapIndex( j );
+        SVTK_ListOfVtk anIds = theMapIndex( j );
         if ( anIds != theIds )
           aNewMap.Add( anIds );
       }
@@ -355,7 +355,7 @@ static bool removeCompositeIndex( SVTK_IndexedMapOfIds& theMapIndex, const SVTK_
 bool
 SVTK_SelectorDef
 ::AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                    const TColStd_IndexedMapOfInteger& theIndices, 
+                    const SVTK_TIndexedMapOfVtkId& theIndices, 
                     bool theIsModeShift)
 {
   TMapIOSubIndex::iterator aMapIter = myMapIOSubIndex.find(theIO);
@@ -364,7 +364,7 @@ SVTK_SelectorDef
     aMapIter = myMapIOSubIndex.
       insert(TMapIOSubIndex::value_type(theIO,anEmpty)).first;
   }
-  TColStd_IndexedMapOfInteger& aMapIndex = aMapIter->second.myMap;
+  SVTK_TIndexedMapOfVtkId& aMapIndex = aMapIter->second.myMap;
 
   if(!theIsModeShift)
     aMapIndex.Clear();
@@ -390,7 +390,7 @@ SVTK_SelectorDef
 bool
 SVTK_SelectorDef
 ::AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                    const TColStd_MapOfInteger& theIndices, 
+                    const SVTK_TVtkIDsMap& theIndices, 
                     bool theIsModeShift)
 {
   TMapIOSubIndex::iterator aMapIter = myMapIOSubIndex.find(theIO);
@@ -399,12 +399,12 @@ SVTK_SelectorDef
     aMapIter = myMapIOSubIndex.
       insert(TMapIOSubIndex::value_type(theIO,anEmpty)).first;
   }
-  TColStd_IndexedMapOfInteger& aMapIndex = aMapIter->second.myMap;
+  SVTK_TIndexedMapOfVtkId& aMapIndex = aMapIter->second.myMap;
 
   if(!theIsModeShift)
     aMapIndex.Clear();
   
-  TColStd_MapIteratorOfMapOfInteger anIter(theIndices);
+  SVTK_TVtkIDsMapIterator anIter(theIndices);
   for(; anIter.More(); anIter.Next())
     aMapIndex.Add(anIter.Key());
   
@@ -435,7 +435,7 @@ SVTK_SelectorDef
     anIter = myMapIOSubIndex.
       insert(TMapIOSubIndex::value_type(theIO,anEmpty)).first;
   }
-  TColStd_IndexedMapOfInteger& aMapIndex = anIter->second.myMap;
+  SVTK_TIndexedMapOfVtkId& aMapIndex = anIter->second.myMap;
 
   bool anIsConatains = aMapIndex.Contains( theIndex ) == Standard_True;
   if ( anIsConatains )
@@ -466,7 +466,7 @@ SVTK_SelectorDef
 {
   if(IsIndexSelected(theIO,theIndex)){
     TMapIOSubIndex::iterator anIter = myMapIOSubIndex.find(theIO);
-    TColStd_IndexedMapOfInteger& aMapIndex = anIter->second.myMap;
+    SVTK_TIndexedMapOfVtkId& aMapIndex = anIter->second.myMap;
     removeIndex(aMapIndex,theIndex);
   }
 }
@@ -499,7 +499,7 @@ SVTK_SelectorDef
 void 
 SVTK_SelectorDef
 ::GetCompositeIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                    SVTK_IndexedMapOfIds& theIds )
+                    SVTK_IndexedMapOfVtkIds& theIds )
 {
   TMapIOSubCompositeIndex::const_iterator anIter = myMapIOSubCompositeIndex.find( theIO );
   if( anIter != myMapIOSubCompositeIndex.end() )
@@ -517,15 +517,15 @@ SVTK_SelectorDef
 bool
 SVTK_SelectorDef
 ::AddOrRemoveCompositeIndex( const Handle( SALOME_InteractiveObject )& theIO, 
-                    const SVTK_IndexedMapOfIds& theIds, 
+                    const SVTK_IndexedMapOfVtkIds& theIds, 
                     bool theIsModeShift)
 {
   TMapIOSubCompositeIndex::iterator aMapIter = myMapIOSubCompositeIndex.find( theIO );
   if( aMapIter == myMapIOSubCompositeIndex.end() ) {
-    SVTK_IndexedMapOfIds anEmpty;
+    SVTK_IndexedMapOfVtkIds anEmpty;
     aMapIter = myMapIOSubCompositeIndex.insert( TMapIOSubCompositeIndex::value_type( theIO, anEmpty ) ).first;
   }
-  SVTK_IndexedMapOfIds& aMapIndex = aMapIter->second;
+  SVTK_IndexedMapOfVtkIds& aMapIndex = aMapIter->second;
 
   if( !theIsModeShift )
     aMapIndex.Clear();
@@ -549,16 +549,16 @@ SVTK_SelectorDef
 bool 
 SVTK_SelectorDef
 ::AddOrRemoveCompositeIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                            SVTK_ListOfInteger theIds,
+                            SVTK_ListOfVtk theIds,
                             bool theIsModeShift)
 {
   TMapIOSubCompositeIndex::iterator anIter = myMapIOSubCompositeIndex.find( theIO );
   if( anIter == myMapIOSubCompositeIndex.end() ) {
-    SVTK_IndexedMapOfIds anEmpty;
+    SVTK_IndexedMapOfVtkIds anEmpty;
     anIter = myMapIOSubCompositeIndex.insert(TMapIOSubCompositeIndex::value_type( theIO,anEmpty ) ).first;
   }
 
-  SVTK_IndexedMapOfIds& aMapIndex = anIter->second;
+  SVTK_IndexedMapOfVtkIds& aMapIndex = anIter->second;
 
   bool anIsContains = aMapIndex.Contains( theIds ) == Standard_True;
   if ( anIsContains )
@@ -584,11 +584,11 @@ SVTK_SelectorDef
 void
 SVTK_SelectorDef
 ::RemoveCompositeIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                       SVTK_ListOfInteger theIds )
+                       SVTK_ListOfVtk theIds )
 {
   if(IsCompositeIndexSelected( theIO, theIds ) ) {
     TMapIOSubCompositeIndex::iterator anIter = myMapIOSubCompositeIndex.find( theIO );
-    SVTK_IndexedMapOfIds& aMapIndex = anIter->second;
+    SVTK_IndexedMapOfVtkIds& aMapIndex = anIter->second;
     removeCompositeIndex( aMapIndex,theIds );
   }
 }
@@ -601,11 +601,11 @@ SVTK_SelectorDef
 bool
 SVTK_SelectorDef
 ::IsCompositeIndexSelected( const Handle(SALOME_InteractiveObject)& theIO, 
-                           SVTK_ListOfInteger theIds ) const
+                           SVTK_ListOfVtk theIds ) const
 {
   TMapIOSubCompositeIndex::const_iterator anIter = myMapIOSubCompositeIndex.find( theIO );
   if( anIter != myMapIOSubCompositeIndex.end() ) {
-    const SVTK_IndexedMapOfIds& aMapIndex = anIter->second;
+    const SVTK_IndexedMapOfVtkIds& aMapIndex = anIter->second;
     return aMapIndex.Contains( theIds ) == Standard_True;
   }
   return false;