]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
vtkIdType collections
authorViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Sat, 20 Feb 2021 11:00:27 +0000 (14:00 +0300)
committerViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Sat, 20 Feb 2021 11:00:27 +0000 (14:00 +0300)
13 files changed:
src/LightApp/LightApp_VTKSelector.cxx
src/LightApp/LightApp_VTKSelector.h
src/SVTK/SALOME_Actor.cxx
src/SVTK/SVTK_Actor.cxx
src/SVTK/SVTK_Actor.h
src/SVTK/SVTK_Hash.h
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_Selector.cxx
src/SVTK/SVTK_Selector.h
src/SVTK/SVTK_SelectorDef.h
src/VTKViewer/VTKViewer_Actor.h
src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.h

index 04feca42af8fba80dcbb57972327afa91a8586ca..989325ba6d5b0d5d2d92e55b7a05931866e132e4 100644 (file)
@@ -77,7 +77,7 @@ LightApp_SVTKDataOwner
 /*!
   Gets dataowners ids list.
 */
-const TColStd_IndexedMapOfInteger
+const SVTK_TIndexedMapOfVtkId
 LightApp_SVTKDataOwner
 ::GetIds() const
 {
index c5db9aaf05b89fb1cfa99fd1aa14641dce5ea5a0..66a19569a952dbaa2672a8725c9b540b6ee8801e 100644 (file)
@@ -33,6 +33,7 @@ class SUIT_Desktop;
 
 #ifndef DISABLE_VTKVIEWER
   #include <TColStd_IndexedMapOfInteger.hxx>
+  #include "SVTK_Hash.h"
   #include "SVTK_Selection.h"
 #ifndef DISABLE_SALOMEOBJECT
   #include "SALOME_InteractiveObject.hxx"
@@ -57,7 +58,7 @@ class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner
    #endif
 
     /*!Gets dataowners ids list.*/
-    const TColStd_IndexedMapOfInteger& GetIds() const;
+    const SVTK_TIndexedMapOfVtkId& GetIds() const;
 
     /*!Gets selection mode.*/
     Selection_Mode GetMode() const;
@@ -66,7 +67,7 @@ class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner
     SALOME_Actor* GetActor() const;
 
  protected:
-    mutable TColStd_IndexedMapOfInteger myIds;
+    mutable SVTK_TIndexedMapOfVtkId myIds;
 
     SVTK_ViewWindow* GetActiveViewWindow() const;
     SUIT_Desktop* myDesktop;
index 8ed50cef4a9993577b8b04671aece4280c618310..70a7c4d3dd39bfe161599e58e77b878261f5a3aa 100644 (file)
@@ -449,7 +449,7 @@ SALOME_Actor
 
   if(mySelector.GetPointer()){
     if(mySelectionMode != ActorSelection){
-      TColStd_IndexedMapOfInteger aMapIndex;
+      SVTK_TIndexedMapOfVtkId aMapIndex;
       mySelector->GetIndex( getIO(), aMapIndex );
       switch( mySelectionMode ) {
       case NodeSelection:
@@ -547,11 +547,11 @@ SALOME_Actor
         vtkIdType anObjId = GetNodeObjId( aVtkId );
         myIsPreselected = (anObjId >= 0);
         if(myIsPreselected){
-          const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex();
+          const SVTK_TIndexedMapOfVtkId& aMapIndex = myPreHighlightActor->GetMapIndex();
           int anExtent = aMapIndex.Extent();
           anIsChanged |= (anExtent == 0 || (anExtent > 0 && anObjId != aMapIndex(1)));
           if(anIsChanged){
-            TColStd_IndexedMapOfInteger aMapIndex;
+            SVTK_TIndexedMapOfVtkId aMapIndex;
             aMapIndex.Add( anObjId );
             
             myPreHighlightActor->GetProperty()->SetRepresentationToPoints();
@@ -578,11 +578,11 @@ SALOME_Actor
         if ( anObjId >= 0 ) {
           myIsPreselected = CheckDimensionId(aSelectionMode,this,anObjId);
           if(myIsPreselected){
-            const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex();
+            const SVTK_TIndexedMapOfVtkId& aMapIndex = myPreHighlightActor->GetMapIndex();
             int anExtent = aMapIndex.Extent();
             anIsChanged |= (anExtent == 0 || (anExtent > 0 && anObjId != aMapIndex(1)));
             if(anIsChanged){
-              TColStd_IndexedMapOfInteger aMapIndex;
+              SVTK_TIndexedMapOfVtkId aMapIndex;
               aMapIndex.Add( anObjId );
               
               myPreHighlightActor->GetProperty()->SetRepresentationToSurface();
@@ -709,7 +709,7 @@ SALOME_Actor
 
       const SVTK_AreaPicker::TVectorIdsMap& aVectorIdsMap = myPointAreaPicker->GetPointIdsMap();
       SVTK_AreaPicker::TVectorIdsMap::const_iterator aMapIter = aVectorIdsMap.find(this);
-      TColStd_MapOfInteger anIndexes;
+      SVTK_TVtkIDsMap anIndexes;
       if(aMapIter != aVectorIdsMap.end()){
         const SVTK_AreaPicker::TVectorIds& aVectorIds = aMapIter->second;
         vtkIdType anEnd = (int)aVectorIds.size(); //!< TODO: conversion from size_t to int
@@ -785,7 +785,7 @@ SALOME_Actor
 
       const SVTK_AreaPicker::TVectorIdsMap& aVectorIdsMap = myCellAreaPicker->GetCellIdsMap();
       SVTK_AreaPicker::TVectorIdsMap::const_iterator aMapIter = aVectorIdsMap.find(this);
-      TColStd_MapOfInteger anIndexes;
+      SVTK_TVtkIDsMap anIndexes;
       if(aMapIter != aVectorIdsMap.end()){
         const SVTK_AreaPicker::TVectorIds& aVectorIds = aMapIter->second;
         vtkIdType anEnd = (int)aVectorIds.size(); //!< TODO: conversion from size_t to int
index 3a34619e56d74914cd6c51751f0e9bab74f4ba85..b09bbcbadd3a442301639ae0506cafa73429b084 100644 (file)
@@ -96,7 +96,7 @@ SVTK_Actor
 {
 }
 
-const TColStd_IndexedMapOfInteger&
+const SVTK_TIndexedMapOfVtkId&
 SVTK_Actor
 ::GetMapIndex() const
 {
@@ -114,7 +114,7 @@ SVTK_Actor
 void
 SVTK_Actor
 ::MapCells(SALOME_Actor* theMapActor,
-           const TColStd_IndexedMapOfInteger& theMapIndex)
+           const SVTK_TIndexedMapOfVtkId& theMapIndex)
 {
   myUnstructuredGrid->Initialize();
   myUnstructuredGrid->Allocate();
@@ -156,7 +156,7 @@ SVTK_Actor
 void 
 SVTK_Actor
 ::MapPoints(SALOME_Actor* theMapActor,
-            const TColStd_IndexedMapOfInteger& theMapIndex)
+            const SVTK_TIndexedMapOfVtkId& theMapIndex)
 {
   myUnstructuredGrid->Initialize();
   myUnstructuredGrid->Allocate();
@@ -185,7 +185,7 @@ SVTK_Actor
 void
 SVTK_Actor
 ::MapEdge(SALOME_Actor* theMapActor,
-          const TColStd_IndexedMapOfInteger& theMapIndex)
+          const SVTK_TIndexedMapOfVtkId& theMapIndex)
 {
   myUnstructuredGrid->Initialize();
   myUnstructuredGrid->Allocate();
index 9b9d3a0e8c7f9dbfdc6b0cc2d2109d1bd5865aa3..ad35ee7a465e0fca491b1dcd4dab051f893c76b5 100644 (file)
@@ -72,17 +72,17 @@ 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 SVTK_TIndexedMapOfVtkId& 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 SVTK_TIndexedMapOfVtkId& 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 SVTK_TIndexedMapOfVtkId& theMapIndex);
 
 //! Allow to recostruct selected edges from source SALOME_Actor and map of subindexes using corner node ids
   virtual void 
@@ -90,14 +90,14 @@ public:
           const SVTK_IndexedMapOfVtkIds& theMapCompositeIndex);
   
 
-  const TColStd_IndexedMapOfInteger&
+  const SVTK_TIndexedMapOfVtkId&
   GetMapIndex() const;
 
   const SVTK_IndexedMapOfVtkIds&
   GetMapCompositeIndex() const;
 
  protected:
-  TColStd_IndexedMapOfInteger myMapIndex;
+  SVTK_TIndexedMapOfVtkId        myMapIndex;
   SVTK_IndexedMapOfVtkIds        myMapCompositeIndex;
 
   vtkSmartPointer<vtkUnstructuredGrid> myUnstructuredGrid;
index 1daf5579c7dd3ccca90aea83536045a615286c72..fb1562eb916729e162b507a7c208f258801734bd 100644 (file)
 
 #include <vector>
 #include <NCollection_IndexedMap.hxx>
+#include <NCollection_Map.hxx>
 #include <Standard_Integer.hxx>
 #include <vtkType.h>
+#include <limits>
 
 typedef std::vector<Standard_Integer> SVTK_ListOfInteger;
 typedef std::vector<vtkIdType> SVTK_ListOfVtk;
@@ -73,7 +75,23 @@ public:
     }
 };
 
+struct svtkIdHasher
+{
+  static int HashCode(const vtkIdType theValue,  const int theUpperBound)
+  {
+    return static_cast<int> ((theValue & std::numeric_limits<vtkIdType>::max()) % theUpperBound + 1);
+  }
+
+  static bool IsEqual( const vtkIdType& id1, const vtkIdType& id2 )
+  {
+    return id1 == id2;
+  }
+};
+
 typedef NCollection_IndexedMap<SVTK_ListOfInteger,SVTK_Hasher> SVTK_IndexedMapOfIds;
 typedef NCollection_IndexedMap<SVTK_ListOfVtk, SVTK_vtkHasher> SVTK_IndexedMapOfVtkIds;
+typedef NCollection_Map< vtkIdType, svtkIdHasher > SVTK_TVtkIDsMap;
+typedef NCollection_Map< vtkIdType, svtkIdHasher >::Iterator SVTK_TVtkIDsMapIterator;
+typedef NCollection_IndexedMap<vtkIdType,svtkIdHasher> SVTK_TIndexedMapOfVtkId;
 
 #endif // SVTK_HASH_H
index 363587850b17dd532164a69c1143fdf68e310537..d0360fb92cca09b3e8b96b80ff61abf09ac3f7f9 100644 (file)
@@ -1374,7 +1374,7 @@ void SVTK_InteractorStyle::onCursorMove(QPoint /*mousePos*/)
           if ( aVtkId >= 0 ) {
             vtkIdType anObjId = anActor->GetNodeObjId( aVtkId );
 
-            TColStd_IndexedMapOfInteger aMapIndex;
+            SVTK_TIndexedMapOfVtkId aMapIndex;
             aMapIndex.Add( anObjId );
             myHighlightSelectionPointActor->MapPoints( anActor, aMapIndex );
 
index b326d37f5adb21f885292780d043e93c0ef31572..a33540d499c424ca46c29471ea418f068938e67d 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);
@@ -355,7 +355,7 @@ static bool removeCompositeIndex( SVTK_IndexedMapOfVtkIds& theMapIndex, const SV
 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);
   }
 }
index 493f1460c0079a026a897f2e443b0a937c5f4d07..4dbca1183c2a9e4965503b78515c733f55545c57 100644 (file)
@@ -130,20 +130,20 @@ public:
   virtual
   void 
   GetIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-            TColStd_IndexedMapOfInteger& theIndex ) = 0;
+            SVTK_TIndexedMapOfVtkId& theIndex ) = 0;
         
   //! Change indices of subselection for given #SALOME_InteractiveObject
   virtual
   bool 
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                    const TColStd_IndexedMapOfInteger& theIndices, 
+                    const SVTK_TIndexedMapOfVtkId& theIndices, 
                     bool theIsModeShift) = 0;
 
   //! Change indexes of subslection for given #SALOME_InteractiveObject
   virtual
   bool 
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                    const TColStd_MapOfInteger& theIndices, 
+                    const SVTK_TVtkIDsMap& theIndices, 
                     bool theIsModeShift) = 0;
 
   //! Change index of subslection for given #SALOME_InteractiveObject
index 1e2f479c19d702664363bd796a217594e12bc1c6..fe7b1f6f73bf633ba5e9347f5916079747458a98 100644 (file)
@@ -106,17 +106,17 @@ public:
   virtual
   void 
   GetIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-            TColStd_IndexedMapOfInteger& theIndex );
+            SVTK_TIndexedMapOfVtkId& theIndex );
         
   virtual
   bool 
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                    const TColStd_IndexedMapOfInteger& theIndices, 
+                    const SVTK_TIndexedMapOfVtkId& theIndices, 
                     bool theIsModeShift);
   virtual
   bool 
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                    const TColStd_MapOfInteger& theIndices, 
+                    const SVTK_TVtkIDsMap& theIndices, 
                     bool theIsModeShift);
   virtual
   bool
@@ -255,7 +255,7 @@ private:
 
   struct TIndexedMapOfInteger
   {
-    TColStd_IndexedMapOfInteger myMap;
+    SVTK_TIndexedMapOfVtkId myMap;
     TIndexedMapOfInteger()
     {}
     TIndexedMapOfInteger(const TIndexedMapOfInteger& theIndexedMapOfInteger)
index 61000a8b71e129cc6659fd0457a9ab87661aa57b..a342a8de746d7d20d38755939f3d0add8c944487 100644 (file)
 
 #include <string>
 #include <vector>
+#include <limits>
+
+#include <NCollection_IndexedMap.hxx>
+#include <NCollection_Map.hxx>
 
 #include <vtkLODActor.h>
 #include <vtkProperty.h>
@@ -394,6 +398,22 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   bool myIsHighlighted;
 };
 
+struct vtkIdHasher
+{
+  static int HashCode(const vtkIdType theValue,  const int theUpperBound)
+  {
+    return static_cast<int> ((theValue & std::numeric_limits<vtkIdType>::max()) % theUpperBound + 1);
+  }
+
+  static bool IsEqual( const vtkIdType& id1, const vtkIdType& id2 )
+  {
+    return id1 == id2;
+  }
+};
+
+typedef NCollection_Map< vtkIdType, vtkIdHasher > TVtkIDsMap;
+typedef NCollection_IndexedMap<vtkIdType,vtkIdHasher> TIndexedMapOfVtkId;
+
 #ifdef WIN32
 #pragma warning ( default:4251 )
 #endif
index 59933dcb53b1884a27386035adf178161381ba39..8fa4f81389b0e458e317b26268dba23ed389bc05 100644 (file)
@@ -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 TIndexedMapOfVtkId& 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 TIndexedMapOfVtkId& theMapIndex,
                                                     VTKViewer_Actor * theMapActor,
                                                     VTKViewer_Actor * theActor,
                                                     TUpdateActor theFun)
index ca321e38cb70eaf5f3ea4ee852e98c2517445097..e1602572e71b46176bd382ac96a9fc64a618f218 100644 (file)
@@ -104,15 +104,15 @@ public:
   
   /** @name Selection Management */
   //@{
-  bool highlightCell(const TColStd_IndexedMapOfInteger& MapIndex,
+  bool highlightCell(const TIndexedMapOfVtkId& MapIndex,
                      VTKViewer_Actor* theMapActor,
                      bool hilight,
                      bool update = true );
-  bool highlightEdge(const TColStd_IndexedMapOfInteger& MapIndex,
+  bool highlightEdge(const TIndexedMapOfVtkId& MapIndex,
                      VTKViewer_Actor* theMapActor,
                      bool hilight,
                      bool update = true );
-  bool highlightPoint(const TColStd_IndexedMapOfInteger& MapIndex,
+  bool highlightPoint(const TIndexedMapOfVtkId& 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 TIndexedMapOfVtkId& 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 TIndexedMapOfVtkId& theMapIndex,
                  VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor,
                  TUpdateActor theFun, bool hilight, bool update);
-  void setActorData(const TColStd_IndexedMapOfInteger& theMapIndex,
+  void setActorData(const TIndexedMapOfVtkId& theMapIndex,
                     VTKViewer_Actor* theMapActor,
                     VTKViewer_Actor *theActor,
                     TUpdateActor theFun);