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())
{
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){
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);
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 );
}
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);
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();
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);
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());
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 )
{
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);
}
}
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() )
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();
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 )
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 );
}
}
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;