-// Copyright (C) 2005 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 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.
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// 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
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// See http://www.salome-platform.org/
+// 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.
+//
+// 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.cxx
// Author : Sergey RUIN
// Module : SALOME
-
+//
#include "SALOMEDS_AttributeParameter.hxx"
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
+
+using namespace std;
//=======================================================================
/*!
* Purpose : Creates a new instance of SALOMEDS_AttributeParameter
*/
//=======================================================================
-SALOMEDS_AttributeParameter::SALOMEDS_AttributeParameter(const Handle(SALOMEDSImpl_AttributeParameter)& theAttr)
+SALOMEDS_AttributeParameter::SALOMEDS_AttributeParameter(SALOMEDSImpl_AttributeParameter* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetInt(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetInt(theID, theValue);
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetInt(theID.c_str(), theValue);
int aValue;
if(_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetInt(theID);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetInt(theID);
}
else
aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetInt(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetReal(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetReal(theID, theValue);
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetReal(theID.c_str(), theValue);
double aValue;
if(_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetReal(theID);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetReal(theID);
}
else
aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetReal(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetString(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetString(theID, theValue);
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetString(theID.c_str(), theValue.c_str());
string aValue;
if(_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetString(theID);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetString(theID);
}
else
aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetString(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetBool(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetBool(theID, theValue);
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetBool(theID.c_str(), theValue);
{
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetBool(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetBool(theID);
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetBool(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetRealArray(theID, theArray);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetRealArray(theID, theArray);
}
else {
SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq;
vector<double> v;
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetRealArray(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetRealArray(theID);
}
else {
SALOMEDS::DoubleSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetRealArray(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetIntArray(theID, theArray);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetIntArray(theID, theArray);
}
else {
SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq;
vector<int> v;
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetIntArray(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetIntArray(theID);
}
else {
SALOMEDS::LongSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetIntArray(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetStrArray(theID, theArray);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetStrArray(theID, theArray);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq;
vector<string> v;
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetStrArray(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetStrArray(theID);
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetStrArray(theID.c_str());
{
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->IsSet(theID, (Parameter_Types)theType);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->IsSet(theID, (Parameter_Types)theType);
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->IsSet(theID.c_str(), theType);
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->RemoveID(theID, (Parameter_Types)theType);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->RemoveID(theID, (Parameter_Types)theType);
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->RemoveID(theID.c_str(), theType);
SALOMEDSClient_AttributeParameter* AP = NULL;
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter) AP_impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetFather();
- if(AP_impl.IsNull()) return _PTR(AttributeParameter)(AP);
+ SALOMEDSImpl_AttributeParameter* AP_impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetFather();
+ if(!AP_impl) return _PTR(AttributeParameter)(AP);
AP = new SALOMEDS_AttributeParameter(AP_impl);
}
else {
{
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->HasFather();
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->HasFather();
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->HasFather();
{
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->IsRoot();
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->IsRoot();
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->IsRoot();
{
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->Clear();
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->Clear();
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->Clear();
vector<string> v;
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter) AP_impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeParameter* AP_impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl);
return AP_impl->GetIDs((Parameter_Types)theType);
}
else {