Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeParameter.cxx
index 8377bfb836b0850b41ea4be0e843e7d48b799614..e6791c23bd5b68b756f4ba01d833a8b9fb2e03b4 100644 (file)
@@ -1,24 +1,25 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  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
+// 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.
 //
-//  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   : SALOMEDS_AttributeParameter.cxx
 //  Author : Sergey RUIN
 //  Module : SALOME
@@ -28,8 +29,6 @@
 
 #include <string>
 
-using namespace std;
-
 //=======================================================================
 /*!
  * Function : Constructor
@@ -65,7 +64,7 @@ SALOMEDS_AttributeParameter::~SALOMEDS_AttributeParameter()
  * Purpose  : Associates a integer value with the ID
  */
 //=======================================================================
-void SALOMEDS_AttributeParameter::SetInt(const string& theID, const int theValue) 
+void SALOMEDS_AttributeParameter::SetInt(const std::string& theID, const int theValue) 
 {
   CheckLocked();
 
@@ -83,7 +82,7 @@ void SALOMEDS_AttributeParameter::SetInt(const string& theID, const int theValue
  * Purpose  : Returns a int value associated with the given ID
  */
 //=======================================================================
-int SALOMEDS_AttributeParameter::GetInt(const string& theID) 
+int SALOMEDS_AttributeParameter::GetInt(const std::string& theID) 
 {
   int aValue;
   if(_isLocal) {
@@ -101,7 +100,7 @@ int SALOMEDS_AttributeParameter::GetInt(const string& theID)
  * Purpose  : Associates a double value with the ID
  */
 //=======================================================================
-void SALOMEDS_AttributeParameter::SetReal(const string& theID, const double& theValue) 
+void SALOMEDS_AttributeParameter::SetReal(const std::string& theID, const double& theValue) 
 {
   CheckLocked();
 
@@ -119,7 +118,7 @@ void SALOMEDS_AttributeParameter::SetReal(const string& theID, const double& the
  * Purpose  : Returns a double value associated with the given ID
  */
 //=======================================================================
-double SALOMEDS_AttributeParameter::GetReal(const string& theID) 
+double SALOMEDS_AttributeParameter::GetReal(const std::string& theID) 
 {
   double aValue;
   if(_isLocal) {
@@ -137,7 +136,7 @@ double SALOMEDS_AttributeParameter::GetReal(const string& theID)
  * Purpose  : Associates a string with the ID
  */
 //=======================================================================
-void SALOMEDS_AttributeParameter::SetString(const string& theID, const string& theValue) 
+void SALOMEDS_AttributeParameter::SetString(const std::string& theID, const std::string& theValue) 
 {
   CheckLocked();
 
@@ -155,9 +154,9 @@ void SALOMEDS_AttributeParameter::SetString(const string& theID, const string& t
  * Purpose  : Returns a string associated with the given ID
  */
 //=======================================================================
-string SALOMEDS_AttributeParameter::GetString(const string& theID) 
+std::string SALOMEDS_AttributeParameter::GetString(const std::string& theID) 
 {
-  string aValue;
+  std::string aValue;
   if(_isLocal) {
     SALOMEDS::Locker lock; 
     aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetString(theID);
@@ -173,7 +172,7 @@ string SALOMEDS_AttributeParameter::GetString(const string& theID)
  * Purpose  : Associates a bool value with the ID
  */
 //=======================================================================
-void SALOMEDS_AttributeParameter::SetBool(const string& theID, const bool& theValue) 
+void SALOMEDS_AttributeParameter::SetBool(const std::string& theID, const bool& theValue) 
 {
   CheckLocked();
 
@@ -191,7 +190,7 @@ void SALOMEDS_AttributeParameter::SetBool(const string& theID, const bool& theVa
  * Purpose  : Returns a bool value associated with the ID
  */
 //=======================================================================
-bool SALOMEDS_AttributeParameter::GetBool(const string& theID) 
+bool SALOMEDS_AttributeParameter::GetBool(const std::string& theID) 
 {
   if(_isLocal) {
     SALOMEDS::Locker lock; 
@@ -207,7 +206,7 @@ bool SALOMEDS_AttributeParameter::GetBool(const string& theID)
  * Purpose  : Associates an array of double values with the given ID
  */
 //=======================================================================
-void SALOMEDS_AttributeParameter::SetRealArray(const string& theID, const vector<double>& theArray) 
+void SALOMEDS_AttributeParameter::SetRealArray(const std::string& theID, const std::vector<double>& theArray) 
 {
   CheckLocked();
 
@@ -232,9 +231,9 @@ void SALOMEDS_AttributeParameter::SetRealArray(const string& theID, const vector
  * Purpose  : Returns an array of double values associated with the ID
  */
 //=======================================================================
-vector<double> SALOMEDS_AttributeParameter::GetRealArray(const string& theID) 
+std::vector<double> SALOMEDS_AttributeParameter::GetRealArray(const std::string& theID) 
 {
-  vector<double> v;
+  std::vector<double> v;
   if(_isLocal) {
     SALOMEDS::Locker lock; 
     return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetRealArray(theID);
@@ -256,7 +255,7 @@ vector<double> SALOMEDS_AttributeParameter::GetRealArray(const string& theID)
  * Purpose  : Associates an array of int values with the given ID
  */
 //=======================================================================
-void SALOMEDS_AttributeParameter::SetIntArray(const string& theID, const vector<int>& theArray) 
+void SALOMEDS_AttributeParameter::SetIntArray(const std::string& theID, const std::vector<int>& theArray) 
 {
   CheckLocked();
 
@@ -281,9 +280,9 @@ void SALOMEDS_AttributeParameter::SetIntArray(const string& theID, const vector<
  * Purpose  : Returns an array of int values associated with the ID
  */
 //=======================================================================
-vector<int> SALOMEDS_AttributeParameter::GetIntArray(const string& theID) 
+std::vector<int> SALOMEDS_AttributeParameter::GetIntArray(const std::string& theID) 
 {
-  vector<int> v;
+  std::vector<int> v;
   if(_isLocal) {
     SALOMEDS::Locker lock; 
     return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetIntArray(theID);
@@ -305,7 +304,7 @@ vector<int> SALOMEDS_AttributeParameter::GetIntArray(const string& theID)
  * Purpose  : Associates an array of string values with the given ID
  */
 //=======================================================================
-void SALOMEDS_AttributeParameter::SetStrArray(const string& theID, const vector<string>& theArray) 
+void SALOMEDS_AttributeParameter::SetStrArray(const std::string& theID, const std::vector<std::string>& theArray) 
 {
   CheckLocked();
 
@@ -330,9 +329,9 @@ void SALOMEDS_AttributeParameter::SetStrArray(const string& theID, const vector<
  * Purpose  : Returns an array of string values associated with the ID
  */
 //=======================================================================
-vector<string> SALOMEDS_AttributeParameter::GetStrArray(const string& theID) 
+std::vector<std::string> SALOMEDS_AttributeParameter::GetStrArray(const std::string& theID) 
 {
-  vector<string> v;
+  std::vector<std::string> v;
   if(_isLocal) {
     SALOMEDS::Locker lock; 
     return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetStrArray(theID);
@@ -342,7 +341,7 @@ vector<string> SALOMEDS_AttributeParameter::GetStrArray(const string& theID)
     int length = aSeq->length();
     if(length) {
       v.resize(length);
-      for(int i = 0; i < length; i++) v[i] = string(aSeq[i].in());
+      for(int i = 0; i < length; i++) v[i] = std::string(aSeq[i].in());
     }
   }
   return v;
@@ -356,7 +355,7 @@ vector<string> SALOMEDS_AttributeParameter::GetStrArray(const string& theID)
  *            a value in the attribute
  */
 //======================================================================= 
-bool SALOMEDS_AttributeParameter::IsSet(const string& theID, const int theType) 
+bool SALOMEDS_AttributeParameter::IsSet(const std::string& theID, const int theType) 
 {
   if(_isLocal) {
     SALOMEDS::Locker lock; 
@@ -372,7 +371,7 @@ bool SALOMEDS_AttributeParameter::IsSet(const string& theID, const int theType)
  * Purpose  : Removes a parameter with given ID
  */
 //======================================================================= 
-bool SALOMEDS_AttributeParameter::RemoveID(const string& theID, const int theType) 
+bool SALOMEDS_AttributeParameter::RemoveID(const std::string& theID, const int theType) 
 {
   CheckLocked();
 
@@ -462,9 +461,9 @@ void SALOMEDS_AttributeParameter::Clear()
  * Purpose  : Returns an array of all ID's of the given type
  */
 //=======================================================================
-vector<string> SALOMEDS_AttributeParameter::GetIDs(const int theType)
+std::vector<std::string> SALOMEDS_AttributeParameter::GetIDs(const int theType)
 {
-  vector<string> v;
+  std::vector<std::string> v;
   if(_isLocal) {
     SALOMEDS::Locker lock; 
     SALOMEDSImpl_AttributeParameter* AP_impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl);
@@ -476,7 +475,7 @@ vector<string> SALOMEDS_AttributeParameter::GetIDs(const int theType)
     int length = CorbaSeq->length();
     if(length) {
       v.resize(length);
-      for(int i = 0; i <length; i++) v[i] = string(CorbaSeq[i].in());
+      for(int i = 0; i <length; i++) v[i] = std::string(CorbaSeq[i].in());
     }
   }