-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// Copyright (C) 2007-2011 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
-//
+//
// 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
+// 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
+//
+// 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
+// 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
//
+
// File : SALOMEDS_AttributeParameter_i.cxx
// Author : Sergey RUIN
// Module : SALOME
-
-
+//
#include "SALOMEDS_AttributeParameter_i.hxx"
#include "SALOMEDS.hxx"
#include <vector>
-using namespace std;
+#include "Utils_ExceptHandlers.hxx"
+UNEXPECT_CATCH(AP_InvalidIdentifier, SALOMEDS::AttributeParameter::InvalidIdentifier);
//=======================================================================
/*!
*/
//=======================================================================
CORBA::Long SALOMEDS_AttributeParameter_i::GetInt(const char* theID)
+ throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
+ Unexpect aCatch (AP_InvalidIdentifier);
return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetInt(theID);
}
*/
//=======================================================================
CORBA::Double SALOMEDS_AttributeParameter_i::GetReal(const char* theID)
+ throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
+ Unexpect aCatch (AP_InvalidIdentifier);
return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetReal(theID);
}
*/
//=======================================================================
char* SALOMEDS_AttributeParameter_i::GetString(const char* theID)
+ throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
+ Unexpect aCatch (AP_InvalidIdentifier);
SALOMEDSImpl_AttributeParameter* impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl);
CORBA::String_var c_s = CORBA::string_dup(impl->GetString(theID).c_str());
return c_s._retn();
*/
//=======================================================================
CORBA::Boolean SALOMEDS_AttributeParameter_i::GetBool(const char* theID)
+ throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
+ Unexpect aCatch (AP_InvalidIdentifier);
return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetBool(theID);
}
{
SALOMEDS::Locker lock;
CheckLocked();
- vector<double> v;
+ std::vector<double> v;
int length = theArray.length();
if(length) {
v.resize(length);
*/
//=======================================================================
SALOMEDS::DoubleSeq* SALOMEDS_AttributeParameter_i::GetRealArray(const char* theID)
+ throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
+ Unexpect aCatch (AP_InvalidIdentifier);
SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq;
- vector<double> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetRealArray(theID);
+ std::vector<double> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetRealArray(theID);
int length = v.size();
if(length) {
aSeq->length(length);
{
SALOMEDS::Locker lock;
CheckLocked();
- vector<int> v;
+ std::vector<int> v;
int length = theArray.length();
if(length) {
v.resize(length);
*/
//=======================================================================
SALOMEDS::LongSeq* SALOMEDS_AttributeParameter_i::GetIntArray(const char* theID)
+ throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
+ Unexpect aCatch (AP_InvalidIdentifier);
SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq;
- vector<int> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetIntArray(theID);
+ std::vector<int> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetIntArray(theID);
int length = v.size();
if(length) {
aSeq->length(length);
{
SALOMEDS::Locker lock;
CheckLocked();
- vector<string> v;
+ std::vector<std::string> v;
int length = theArray.length();
if(length) {
v.resize(length);
- for(int i = 0; i<length; i++) v[i] = string(theArray[i].in());
+ for(int i = 0; i<length; i++) v[i] = std::string(theArray[i].in());
}
dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->SetStrArray(theID, v);
}
*/
//=======================================================================
SALOMEDS::StringSeq* SALOMEDS_AttributeParameter_i::GetStrArray(const char* theID)
+ throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
+ Unexpect aCatch (AP_InvalidIdentifier);
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq;
- vector<string> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetStrArray(theID);
+ std::vector<std::string> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetStrArray(theID);
int length = v.size();
if(length) {
aSeq->length(length);
{
SALOMEDS::Locker lock;
SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq;
- vector<string> A = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetIDs((Parameter_Types)theType);
+ std::vector<std::string> A = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetIDs((Parameter_Types)theType);
if(A.size()) {
int length = A.size();