Salome HOME
Fix for bug 10438: Crash during Explode on Blocks operation (Global selection on...
[modules/gui.git] / src / SVTK / SVTK_SelectorDef.h
index ec7ae91aa6beaa6446731d8a595c22c210356320..47f593e9a3b438ee3bd533b4affe93f653d34846 100644 (file)
 #ifndef SVTK_SELECTORDEF_H
 #define SVTK_SELECTORDEF_H
 
-#include <NCollection_DataMap.hxx>
-#include <vtkSmartPointer.h>
+#include <set>
+#include <map>
+
+#include <TColStd_IndexedMapOfInteger.hxx>
 #include <TColStd_MapOfInteger.hxx>
+#include <vtkSmartPointer.h>
 
 #include "SVTK_Selector.h"
 
@@ -131,12 +134,42 @@ public:
   ClearIndex();
 
 private:
-  typedef NCollection_DataMap<Handle(SALOME_InteractiveObject),
-                              vtkSmartPointer<SALOME_Actor> > TIO2Actors;
-  TIO2Actors myIO2Actors;
   Selection_Mode mySelectionMode;
-  SALOME_ListIO myIObjects;
-  SALOME_DataMapOfIOMapOfInteger myMapIOSubIndex;
+
+  struct TIOLessThan
+  {
+    bool 
+    operator()(const Handle(SALOME_InteractiveObject)& theRightIO,
+              const Handle(SALOME_InteractiveObject)& theLeftIO) const
+    {
+      return strcmp(theRightIO->getEntry(),theLeftIO->getEntry()) < 0;
+    }
+  };
+
+  struct TIndexedMapOfInteger{
+    TColStd_IndexedMapOfInteger myMap;
+    TIndexedMapOfInteger()
+    {}
+    TIndexedMapOfInteger(const TIndexedMapOfInteger& theIndexedMapOfInteger)
+    {
+      myMap = theIndexedMapOfInteger.myMap;
+    }
+  };
+
+  mutable SALOME_ListIO myIObjectList;
+  typedef std::set<Handle(SALOME_InteractiveObject),
+                   TIOLessThan> TIObjects;
+  TIObjects myIObjects;
+
+  typedef std::map<Handle(SALOME_InteractiveObject),
+                   vtkSmartPointer<SALOME_Actor>,
+                   TIOLessThan> TIO2Actors;
+  TIO2Actors myIO2Actors;
+
+  typedef std::map<Handle(SALOME_InteractiveObject),
+                   TIndexedMapOfInteger,
+                   TIOLessThan> TMapIOSubIndex;
+  TMapIOSubIndex myMapIOSubIndex;
 };