]> OCCT Git - occt-wok.git/commitdiff
No comments
authorcas <cas@opencascade.com>
Wed, 24 Nov 1999 18:03:07 +0000 (18:03 +0000)
committercas <cas@opencascade.com>
Wed, 24 Nov 1999 18:03:07 +0000 (18:03 +0000)
src/WOKTools/FILES
src/WOKTools/WOKTools_BasicMap.cxx
src/WOKTools/WOKTools_BasicMap.lxx
src/WOKTools/WOKTools_DataMap.gxx
src/WOKTools/WOKTools_DoubleMap.gxx
src/WOKTools/WOKTools_IndexedDataMap.gxx
src/WOKTools/WOKTools_IndexedMap.gxx
src/WOKTools/WOKTools_Map.gxx
src/WOKTools/WOKTools_Replace.tcl

index b209cc31a01cf9277e22bc9fd018c339499bebf6..3b82d85ee10f6df94e8240f14514a1893896ed0a 100755 (executable)
@@ -1,4 +1,3 @@
-WOKTools_WOKSteps.edl
 WOKTools_PUsage.hxx
 WOKTools_ArgTable.hxx
 WOKTools_MsgHandler.hxx
index 08865fdc947da5925c71039dc7b37cf40f7d330b..2bd529941a0e2bf84fdec727091d51d36854c88f 100755 (executable)
@@ -56,10 +56,10 @@ Standard_Boolean  WOKTools_BasicMap::BeginResize
     else
       return Standard_False;
   }
-  data1 = aStorageManager.Allocate((N+1)*sizeof(void*));
+  data1 = Standard::Allocate((N+1)*sizeof(void*));
   memset(data1, 0, (N+1)*sizeof(void*));
   if (isDouble) {
-    data2 = aStorageManager.Allocate((N+1)*sizeof(void*));
+    data2 = Standard::Allocate((N+1)*sizeof(void*));
     memset(data2, 0, (N+1)*sizeof(void*));
   }
   else
@@ -79,9 +79,9 @@ void  WOKTools_BasicMap::EndResize(const Standard_Integer NbBuckets,
                                      const Standard_Address data2)
 {
   if (myData1)
-    aStorageManager.Free(myData1,(myNbBuckets+1)*sizeof(void*));
+    Standard::Free(myData1,(myNbBuckets+1)*sizeof(void*));
   if (myData2)
-    aStorageManager.Free(myData2,(myNbBuckets+1)*sizeof(void*));
+    Standard::Free(myData2,(myNbBuckets+1)*sizeof(void*));
   myNbBuckets = N;
   mySaturated = myNbBuckets <= NbBuckets;
   myData1 = data1;
@@ -99,10 +99,10 @@ void  WOKTools_BasicMap::Destroy()
   mySize = 0;
   mySaturated = Standard_False;
   if (myData1)
-    aStorageManager.Free(myData1,(myNbBuckets+1)*sizeof(void*));
+    Standard::Free(myData1,(myNbBuckets+1)*sizeof(void*));
   if (isDouble) {
     if (myData2)
-      aStorageManager.Free(myData2,(myNbBuckets+1)*sizeof(void*));
+      Standard::Free(myData2,(myNbBuckets+1)*sizeof(void*));
   }
   myData1 = myData2 = NULL;
 }
index a8a46a76dc4e0cdd59bcca82040cee4edbba9e42..a941e169aa4dde6e2990e21fd97c57d17837ecbb 100755 (executable)
@@ -5,7 +5,8 @@
 
 #include <MMgt_StorageManager.hxx>
 
-extern Standard_IMPORT MMgt_StorageManager aStorageManager;
+//extern Standard_IMPORT MMgt_StorageManager aStorageManager;
+//Standard_IMPORT MMgt_StorageManager aStorageManager;
 
 
 //=======================================================================
index 3f4dc61f8863a537051f2cca3d027bc06908c341..a7dd93ccdde9245dde4deaf1a300abe2b091aa00 100755 (executable)
@@ -16,9 +16,9 @@ template <class Item, class Key> class DataMapNode  : public WOKTools_MapNode {
     DataMapNode(const Key& K, const Standard_Integer ahascode, const Item& I, DataMapNode* n) :
       WOKTools_MapNode(n), key(K), hashcode(ahascode) { value = I; }
   void* operator new(size_t aSize) 
-    {return aStorageManager.Allocate(aSize);}
+    {return Standard::Allocate(aSize);}
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
 
   Key           key;
@@ -35,9 +35,9 @@ class Node  : public WOKTools_MapNode {
     Node(const TheKey& K, const Standard_Integer ahascode, const TheItem& I, Node* n) :
       WOKTools_MapNode(n), key(K), hashcode(ahascode) { value = I; }
   void* operator new(size_t aSize) 
-    {return aStorageManager.Allocate(aSize);}
+    {return Standard::Allocate(aSize);}
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
 
   TheKey           key;
index 5b57b14e53a9c88cfde763c04c407e422bda5c52..ac0220ca88167881819638a26dc47a84ecdbb4a6 100755 (executable)
@@ -17,9 +17,9 @@ template <class Key1, class Key2> class DoubleMapNode : public WOKTools_MapNode{
     Node(const Key1& K1, const Standard_Integer acode1, const Key2& K2, const Standard_Integer acode2, DoubleMapNode* n1, DoubleMapNode* n2) :
       WOKTools_MapNode(n1),key1(K1),hashcode1(acode1), key2(K2), hashcode2(acode2), next2(n2) {}
   void* operator new(size_t aSize) 
-    {return aStorageManager.Allocate(aSize);}
+    {return Standard::Allocate(aSize);}
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
 
   Key1   key1;
@@ -38,9 +38,9 @@ class Node : public WOKTools_MapNode{
     Node(const TheKey1& K1, const Standard_Integer acode1, const TheKey2& K2, const Standard_Integer acode2, Node* n1, Node* n2) :
       WOKTools_MapNode(n1),key1(K1),hashcode1(acode1), key2(K2), hashcode2(acode2), next2(n2) {}
   void* operator new(size_t aSize) 
-    {return aStorageManager.Allocate(aSize);}
+    {return Standard::Allocate(aSize);}
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
 
   TheKey1   key1;
index 30bce9b53e2bfadc0f1fe1d5f94e49088c08c990..fd7e0c0b75fd75ee337d52cd7aa143f46f7e81e1 100755 (executable)
@@ -19,10 +19,10 @@ template <class Key, class Item> class IndexedDataMapNode : public WOKTools_MapN
                 const Standard_Integer ahashcode, IndexedDataMapNode* n1, IndexedDataMapNode* n2) 
     : WOKTools_MapNode(n1),key(K1),index(K2),value(I),next2(n2),hashcode(ahashcode) {}
   void* operator new(size_t aSize) {
-    return aStorageManager.Allocate(aSize);
+    return Standard::Allocate(aSize);
   }
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
 
   Key                 key;
@@ -42,10 +42,10 @@ class Node : public WOKTools_MapNode {
         const Standard_Integer ahashcode, Node* n1, Node* n2) :
       WOKTools_MapNode(n1),key(K1),index(K2),hashcode(ahashcode),next2(n2) { value =I;}
   void* operator new(size_t aSize) {
-    return aStorageManager.Allocate(aSize);
+    return Standard::Allocate(aSize);
   }
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
 
   TheKey                key;
index a62fb4b6e983b87109afc1ec4c1f24e4f2f13b8e..303000afcefeb71a1e9bdc19ea4a3a111e8abe8c 100755 (executable)
@@ -17,10 +17,10 @@ template <class Key> class IndexedMapNode : public WOKTools_MapNode {
   IndexedMapNode(const Key& K1, const Standard_Integer K2, const Standard_Integer ahashcode, IndexedMapNode* n1, IndexedMapNode* n2) 
     : WOKTools_MapNode(n1),key(K1),index(K2),next2(n2),hashcode(ahashcode) {}
   void* operator new(size_t aSize) {
-    return aStorageManager.Allocate(aSize);
+    return Standard::Allocate(aSize);
   }
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
 
   Key                key;
@@ -39,10 +39,10 @@ class Node : public WOKTools_MapNode {
   Node(const TheKey& K, const Standard_Integer theIndex, const Standard_Integer ahashcode, Node* n1, Node* n2) 
     : WOKTools_MapNode(n1),key(K),index(theIndex),hashcode(ahashcode),next2(n2) {}
   void* operator new(size_t aSize) {
-    return aStorageManager.Allocate(aSize);
+    return Standard::Allocate(aSize);
   }
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
   
   TheKey             key;
index 304f623567ac0f8fbfb419a4bc949f42501d967b..cf80cf99f345149c2b7a1c2c1feec3681963fa84 100755 (executable)
@@ -15,9 +15,9 @@ template <class TheKey> class MapNode : public WOKTools_MapNode {
   public :
     MapNode(const TheKey& K, const Standard_Integer ahascode, MapNode* n) : WOKTools_MapNode(n),key(K), hashcode(ahascode) {}
   void* operator new(size_t aSize) 
-    {return aStorageManager.Allocate(aSize);}
+    {return Standard::Allocate(aSize);}
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
   TheKey   key;
   Standard_Integer hashcode;
@@ -31,9 +31,9 @@ class Node : public WOKTools_MapNode {
   public :
     Node(const TheKey& K, const Standard_Integer ahascode, Node* n) : WOKTools_MapNode(n),key(K), hashcode(ahascode) {}
   void* operator new(size_t aSize) 
-    {return aStorageManager.Allocate(aSize);}
+    {return Standard::Allocate(aSize);}
   void  operator delete(void* aNode, size_t aSize) {
-    aStorageManager.Free(aNode,aSize);
+    Standard::Free(aNode,aSize);
   }
   TheKey   key;
   Standard_Integer hashcode;
index 2fffb9849b002a6faa4dff6be471d7fc6a64b156..453a7886899d7e160f5da5ba81c36ad6a8d9b97b 100755 (executable)
@@ -1,15 +1,15 @@
 
 
-proc WOKTools_Replace:AdmFileType {} {
+proc WOKTools_Replace::AdmFileType {} {
     return "dbadmfile";
 }
 
-proc WOKTools_Replace:OutputDirTypeName {} {
+proc WOKTools_Replace::OutputDirTypeName {} {
     return "dbtmpfile";
 }
 
 
-proc WOKTools_Replace:HandleInputFile { ID } { 
+proc WOKTools_Replace::HandleInputFile { ID } { 
 
     scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
 
@@ -22,7 +22,7 @@ proc WOKTools_Replace:HandleInputFile { ID } {
     }
 }
 
-proc WOKTools_Replace:Execute { unit args } {
+proc WOKTools_Replace::Execute { unit args } {
     
     global tcl_interactive
 
@@ -50,15 +50,15 @@ proc WOKTools_Replace:Execute { unit args } {
 
        regsub -all "/" " $source $target" $replstr  TheArgs
 
-       set A [catch {eval "wokcmp $TheArgs"} result ]
+       set A [catch {eval exec "cmp $TheArgs"} result ]
 
-       if { [wokparam -e %Station $unit] == "wnt" && $result != "" } {
+       if { $result != "" } {
            set result 0
        } else { set result 1 }
        
        if { ! $result } {
            msgprint -i -c "WOKTools_Replace::Execute" "Copy $source to $target"
-           if { [wokparam -e %Station $unit] != "wnt" } {
+           if { [file exist $target] && [wokparam -e %Station $unit] != "wnt" } {
                eval exec "chmod u+w $target"
            }
            eval exec "$copycmd $TheArgs"