]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
debug (setID(); GetID())
authorisn <isn@opencascade.com>
Thu, 7 Dec 2017 13:00:31 +0000 (16:00 +0300)
committerisn <isn@opencascade.com>
Thu, 7 Dec 2017 13:00:31 +0000 (16:00 +0300)
src/HYDROData/HYDROData_Document.cxx
src/HYDROData/HYDROData_Iterator.cxx
src/HYDROData/HYDROData_PriorityQueue.cxx
src/HYDROData/HYDROData_Profile.cxx

index d8abe576f94f2d92b1b2d87fb8d1bd064b970e53..c1c6e9e6d750d504483f9090e4f9fe218e5b264b 100644 (file)
@@ -228,7 +228,11 @@ void HYDROData_Document::SetDefaultStricklerCoefficient( double theCoeff ) const
     {
         Handle(TDataStd_Real) anAttr;
         if ( !aLabel.FindAttribute( TDataStd_Real::GetID(), anAttr ) )
-            aLabel.AddAttribute( anAttr = new TDataStd_Real() );
+        {
+          anAttr = new TDataStd_Real();
+          aLabel.AddAttribute(anAttr);
+          anAttr->SetID(TDataStd_Real::GetID());
+        }
         anAttr->Set( theCoeff );
     }
 }
@@ -253,7 +257,11 @@ void HYDROData_Document::SetCountQuadtree( int nbQuad) const
   {
       Handle(TDataStd_Integer) anAttr;
       if ( !aLabel.FindAttribute( TDataStd_Integer::GetID(), anAttr ) )
-          aLabel.AddAttribute( anAttr = new TDataStd_Integer() );
+      {
+        anAttr = new TDataStd_Integer();
+        aLabel.AddAttribute(anAttr);
+        anAttr->SetID(TDataStd_Integer::GetID());
+        }
       anAttr->Set( nbQuad );
   }
 }
@@ -278,7 +286,11 @@ void HYDROData_Document::SetCountDelaunay( int nbDelaunay) const
   {
       Handle(TDataStd_Integer) anAttr;
       if ( !aLabel.FindAttribute( TDataStd_Integer::GetID(), anAttr ) )
-          aLabel.AddAttribute( anAttr = new TDataStd_Integer() );
+      {
+        anAttr = new TDataStd_Integer();
+        aLabel.AddAttribute(anAttr);
+        anAttr->SetID(TDataStd_Integer::GetID());
+      }
       anAttr->Set( nbDelaunay );
   }
 }
index 8382162a3f1c6fa36fdf491f637941a7e0bb57a9..3277b3f52d2fb549e39b5dc27d453ba9399244dd 100644 (file)
@@ -106,7 +106,7 @@ Handle(HYDROData_Entity) HYDROData_Iterator::CreateObject( TDF_Label&        the
 
   Handle(TDataStd_NamedData) aNamedData;
   theNewLabel.FindAttribute( TDataStd_NamedData::GetID(), aNamedData );
-  aNamedData->SetInteger( "ObjectKind", theObjectKind );
+  aNamedData->SetInteger( "ObjectKind", theObjectKind ); //??CAF
 
   return Object( theNewLabel );
 }
index 27427dd4c7e6f7570c254f435e9720f01125b019..29678299dcaa4777bd1ffa53019cff1628ff9f85 100644 (file)
@@ -150,20 +150,25 @@ void HYDROData_PriorityQueue::AddRule( TDF_Label&                      theRulesL
 
   TDF_Label anObj1Lab = aNewRuleLab.FindChild( Object1_Tag );
   Handle(TDataStd_ReferenceList) aRefs = TDataStd_ReferenceList::Set( anObj1Lab );
+  aRefs->SetID(TDataStd_ReferenceList::GetID());
   aRefs->Append( theObject1->Label() );
   
   TDF_Label aPriorityLab = aNewRuleLab.FindChild( Priority_Tag );
-  TDataStd_Integer::Set( aPriorityLab, thePriority );
+  Handle(TDataStd_Integer) anPLAttr = TDataStd_Integer::Set( aPriorityLab, thePriority );
+  anPLAttr->SetID(TDataStd_Integer::GetID());
 
   TDF_Label anObj2Lab = aNewRuleLab.FindChild( Object2_Tag );
   aRefs = TDataStd_ReferenceList::Set( anObj2Lab );
+  aRefs->SetID(TDataStd_ReferenceList::GetID());
   aRefs->Append( theObject2->Label() );
 
   TDF_Label aMergeLab = aNewRuleLab.FindChild( Merge_Tag );
-  TDataStd_Integer::Set( aMergeLab, theMergeType );
+  Handle(TDataStd_Integer) anMLAttr = TDataStd_Integer::Set( aMergeLab, theMergeType );
+  anMLAttr->SetID(TDataStd_Integer::GetID());
 
   // Increment the last rule index
-  TDataStd_Integer::Set( theRulesLabel, aRuleIndex + 1 );
+  Handle(TDataStd_Integer) anRLAttr = TDataStd_Integer::Set( theRulesLabel, aRuleIndex + 1 );
+  anRLAttr->SetID(TDataStd_Integer::GetID());
 }
 
 HYDROData_ListOfRules HYDROData_PriorityQueue::GetRules( const TDF_Label& theRulesLabel )
index 0057722b7707d1bf1572393fb48bf378843795c2..936e95130fbf7acc2a2ea482b1aacda786c38a26 100644 (file)
@@ -225,7 +225,10 @@ void HYDROData_Profile::SetLeftPoint( const gp_XY& theGPoint, bool IsConvertFrom
 
   Handle(TDataStd_RealArray) anArray;
   if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), anArray ) )
+  {
     anArray = TDataStd_RealArray::Set( aLabel, 0, 1 );
+    anArray->SetID(TDataStd_RealArray::GetID());
+  }
 
   anArray->SetValue( 0, aLPoint.X() );
   anArray->SetValue( 1, aLPoint.Y() );
@@ -277,7 +280,10 @@ void HYDROData_Profile::SetRightPoint( const gp_XY& theGPoint, bool IsConvertFro
 
   Handle(TDataStd_RealArray) anArray;
   if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), anArray ) )
+  {
     anArray = TDataStd_RealArray::Set( aLabel, 0, 1 );
+    anArray->SetID(TDataStd_RealArray::GetID());
+  }
 
   anArray->SetValue( 0, aLPoint.X() );
   anArray->SetValue( 1, aLPoint.Y() );
@@ -463,7 +469,8 @@ HYDROData_Profile::ProfilePoints HYDROData_Profile::GetProfilePoints
 
 void HYDROData_Profile::SetFilePath( const TCollection_AsciiString& theFilePath )
 {
-  TDataStd_AsciiString::Set( myLab.FindChild( DataTag_FilePath ), theFilePath );
+   Handle(TDataStd_AsciiString) anAttr = TDataStd_AsciiString::Set( myLab.FindChild( DataTag_FilePath ), theFilePath );
+   anAttr->SetID(TDataStd_AsciiString::GetID());
 }
 
 TCollection_AsciiString HYDROData_Profile::GetFilePath() const