-// File: DDF_DataCommands.cxx
+// Created by: DAUTRY Philippe
+// Copyright (c) 1997-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
// --------------------
-// Author: DAUTRY Philippe
-// <fid@fox.paris1.matra-dtv.fr>
-// Copyright: Matra Datavision 1997
// Version: 0.0
-// History: Version Date Purpose
+//Version Date Purpose
// 0.0 Sep 30 1997 Creation
if (!D.IsNull ()) {
NewDDF = Handle(DDF_Data)::DownCast (D);
if (!NewDDF.IsNull ()) {
- di<<"DDF_BasicCommands::MakeDF - Sorry, this Data Framework already exists"<<"\n";
+ di<<"DDF_BasicCommands::MakeDF - Sorry, this Data Framework already exists\n";
return 0;
}
}
}
}
- di<<"DDF_BasicCommands::MakeDF - Sorry, this Data Framework doesn't exist"<<"\n";
+ di<<"DDF_BasicCommands::MakeDF - Sorry, this Data Framework doesn't exist\n";
return 0;
}
Handle(TDF_DataSet) DataSet = new TDF_DataSet;
- DataSet->AddRoot(Label1);
+ DataSet->AddLabel(Label1);
TDF_ClosureTool::Closure(DataSet);
Handle(TDF_RelocationTable) Reloc = new TDF_RelocationTable();
Reloc->SetRelocation(Label1,Label2);
D = Draw::Get(a[1]);
if (D.IsNull ()) {
- di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist"<<"\n";
+ di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist\n";
return Standard_False;
}
DDF = Handle(DDF_Data)::DownCast (D);
if (DDF.IsNull ()) {
- di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist"<<"\n";
+ di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist\n";
return Standard_False;
}
- di<<"*********** Dump of "<<a[1]<<" ***********"<<"\n";
+ di<<"*********** Dump of "<<a[1]<<" ***********\n";
//DDF->DataFramework()->Dump(cout);
Standard_SStream aSStream;
D = Draw::Get(a[1]);
if (D.IsNull ()) {
- di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist"<<"\n";
+ di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist\n";
return Standard_False;
}
DDF = Handle(DDF_Data)::DownCast (D);
if (DDF.IsNull ()) {
- di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist"<<"\n";
+ di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist\n";
return Standard_False;
}
- di<<"*********** Dump of "<<a[1]<<" ***********"<<"\n";
+ di<<"*********** Dump of "<<a[1]<<" ***********\n";
TDF_IDFilter filter(Standard_False);
//TDF_Tool::ExtendedDeepDump(cout,DDF->DataFramework(),filter);
if(!DDF::GetDF(a[1], DF)) return 1;
if (!DDF::FindLabel(DF,a[2],SOURCE)) return 1;
if (DDF::FindLabel(DF,a[3],TARGET)) {
- di << " target label is already setted "<< "\n";
+ di << " target label is already setted \n";
return 1;
}
DDF::AddLabel(DF,a[3],TARGET);
cop.Load(SOURCE, TARGET);
cop.Perform();
if (!cop.IsDone())
- di << "copy not done" << "\n";
+ di << "copy not done\n";
return 0;
}
- di << "DDF_CopyLabel : Error" << "\n";
+ di << "DDF_CopyLabel : Error\n";
return 1;
}
}
TDF_Tool::Entry(sAtt->Label(), entr1);
//cout<<"\tAttribute dynamic type = "<<sAtt->DynamicType()<<",\tlocated on Label = "<<entr1<<endl;
- di<<"\tAttribute dynamic type = ";
- Standard_SStream aSStream;
- sAtt->DynamicType()->Print(aSStream);
- aSStream << ends;
- di << aSStream;
+ di<<"\tAttribute dynamic type = " << sAtt->DynamicType()->Name();
di<<",\tlocated on Label = "<<entr1.ToCString()<<"\n";
}
}
ds1->Clear();
}
if(!Shar)
- di << "Shareable attributes not found" << "\n";
+ di << "Shareable attributes not found\n";
return 0;
}
- di << "DDF_CheckAttrs : Error" << "\n";
+ di << "DDF_CheckAttrs : Error\n";
return 1;
}
for (TDF_AttributeIterator itr(SOURCE); itr.More(); itr.Next()) {
itr.Value()->References(ds1);
//cout<<"\tSource Attribute dynamic type = "<<itr.Value()->DynamicType()<<endl;
- di<<"\tSource Attribute dynamic type = ";
- Standard_SStream aSStream1;
- itr.Value()->DynamicType()->Print(aSStream1);
- aSStream1 << ends;
- di << aSStream1 << "\n";
+ di<<"\tSource Attribute dynamic type = " << itr.Value()->DynamicType()->Name() << "\n";
const TDF_AttributeMap& attMap = ds1->Attributes(); //attMap
for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) {
Handle(TDF_Attribute) sAtt = attMItr.Key();
TCollection_AsciiString entry;
TDF_Tool::Entry(sAtt->Label(), entry);
//cout<<"\t\tReferences attribute dynamic type = "<<sAtt->DynamicType()<<",\tLabel = "<<entry<<endl;
- di<<"\t\tReferences attribute dynamic type = ";
- Standard_SStream aSStream2;
- sAtt->DynamicType()->Print(aSStream2);
- di << aSStream2;
+ di<<"\t\tReferences attribute dynamic type = " << sAtt->DynamicType()->Name();
di<<",\tLabel = "<<entry.ToCString()<<"\n";
}
ds1->Clear();
return 0;
}
- di << "DDF_ChecLabel : Error" << "\n";
+ di << "DDF_ChecLabel : Error\n";
return 1;
}