Salome HOME
Merge branch 'agy/mem_peak_0_integ'
[modules/kernel.git] / src / SALOMEDSImpl / testDS.cxx
index c42bfa2aa97a2a77f7b4f090451b5d4db72ac7b6..37ee3e95cdb25e6799e490b6400146bc2491d43d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,7 +34,6 @@
 #include "DF_ChildIterator.hxx"
 
 #include "SALOMEDSImpl_Attributes.hxx"
-#include "SALOMEDSImpl_StudyManager.hxx"
 #include "SALOMEDSImpl_Study.hxx"
 #include "SALOMEDSImpl_StudyBuilder.hxx"
 #include "SALOMEDSImpl_SObject.hxx"
@@ -49,10 +48,8 @@ int main (int argc, char * argv[])
 {
   std::cout << "Test started " << std::endl;
 
-  SALOMEDSImpl_StudyManager* aSM = new SALOMEDSImpl_StudyManager();
-  std::cout << "Manager is created " << std::endl;
-  SALOMEDSImpl_Study* aStudy = aSM->NewStudy("SRN");
-  std::cout << "Study with id = " << aStudy->StudyId() << " is created " << std::endl; 
+  SALOMEDSImpl_Study* aStudy = new SALOMEDSImpl_Study();
+  std::cout << "Study is created" << std::endl;
 
   std::cout << "Check the study lock, locking"   << std::endl;
   aStudy->SetStudyLock("SRN");
@@ -102,7 +99,7 @@ int main (int argc, char * argv[])
   
   aTDFAttr = aBuilder->FindOrCreateAttribute(aSubSO, "AttributeUserID");
   if(aTDFAttr) {
-    std::cout << "Attribute UserID was created succesfully : id = " << dynamic_cast<SALOMEDSImpl_AttributeUserID*>(aTDFAttr)->Value() << std::endl;
+    std::cout << "Attribute UserID was created successfully : id = " << dynamic_cast<SALOMEDSImpl_AttributeUserID*>(aTDFAttr)->Value() << std::endl;
   }
   else std::cout << "Can't create AttributeUserID"   << std::endl;
   
@@ -113,7 +110,7 @@ int main (int argc, char * argv[])
   std::string id2 = "0e1c36e6-379b-4d90-ab3b-18a14310e648";
   aTDFAttr = aBuilder->FindOrCreateAttribute(aSubSO, "AttributeUserID"+id2);
   if(aTDFAttr) {
-    std::cout << "Attribute UserID was created succesfully : id = " << dynamic_cast<SALOMEDSImpl_AttributeUserID*>(aTDFAttr)->Value() << std::endl;
+    std::cout << "Attribute UserID was created successfully : id = " << dynamic_cast<SALOMEDSImpl_AttributeUserID*>(aTDFAttr)->Value() << std::endl;
   }
   else std::cout << "Can't create AttributeUserID"   << std::endl;