Salome HOME
updated copyright message
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_AttributePythonObject.cxx
index 3de92728ff99d086eaea7f9594b264b09dad94fc..e12015d063cd6cd576668b45c53ee02f830ed0b7 100644 (file)
@@ -1,32 +1,31 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  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.
+// 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, 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
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SALOMEDSImpl_AttributePythonObject.cxx
 //  Author : Michael Ponikarov
 //  Module : SALOME
 //
 #include "SALOMEDSImpl_AttributePythonObject.hxx"
 
-using namespace std;
-
 const std::string& SALOMEDSImpl_AttributePythonObject::GetID() 
 {
   static std::string SALOMEDSImpl_AttributePythonObjectID ("128371A3-8F52-11d6-A8A3-0001021E8C7F");
@@ -49,8 +48,8 @@ SALOMEDSImpl_AttributePythonObject::SALOMEDSImpl_AttributePythonObject()
     myIsScript = false;
 }
 
-void SALOMEDSImpl_AttributePythonObject::SetObject(const string& theSequence,
-                                                  const bool theScript) 
+void SALOMEDSImpl_AttributePythonObject::SetObject(const std::string& theSequence,
+                                                   const bool theScript) 
 {
   CheckLocked();
   Backup();
@@ -60,7 +59,7 @@ void SALOMEDSImpl_AttributePythonObject::SetObject(const string& theSequence,
   SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
-string SALOMEDSImpl_AttributePythonObject::GetObject() const
+std::string SALOMEDSImpl_AttributePythonObject::GetObject() const
 {
   return mySequence;
 }
@@ -72,7 +71,7 @@ bool SALOMEDSImpl_AttributePythonObject::IsScript() const
 
 int SALOMEDSImpl_AttributePythonObject::GetLength() const
 {
-  return mySequence.size();
+  return (int)mySequence.size(); //!< TODO: conversion from size_t to int
 }
 
 const std::string& SALOMEDSImpl_AttributePythonObject::ID() const
@@ -98,16 +97,16 @@ void SALOMEDSImpl_AttributePythonObject::Paste(DF_Attribute* into)
 }
 
 
-string SALOMEDSImpl_AttributePythonObject::Save() 
+std::string SALOMEDSImpl_AttributePythonObject::Save() 
 {
-  string aString = GetObject();
-  string aResult = IsScript()?"s":"n";
+  std::string aString = GetObject();
+  std::string aResult = IsScript()?"s":"n";
   aResult += aString;
   
   return aResult;
 }
-         
-void SALOMEDSImpl_AttributePythonObject::Load(const string& value) 
+          
+void SALOMEDSImpl_AttributePythonObject::Load(const std::string& value) 
 {
   char* aString = (char*)value.c_str();
   SetObject(aString + 1, aString[0]=='s');