-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SALOMEDS_SObject.hxx
// Author : Sergey RUIN
// Module : SALOME
#endif
-
-using namespace std;
-
SALOMEDS_SObject::SALOMEDS_SObject(SALOMEDS::SObject_ptr theSObject)
{
#ifdef WIN32
}
}
+bool SALOMEDS_SObject::IsNull() const
+{
+ return _isLocal ? ( !_local_impl || _local_impl->IsNull() ) : _corba_impl->IsNull();
+}
+
std::string SALOMEDS_SObject::GetID()
{
std::string aValue;
else _corba_impl->Name(theName.c_str());
}
-vector<_PTR(GenericAttribute)> SALOMEDS_SObject::GetAllAttributes()
+std::vector<_PTR(GenericAttribute)> SALOMEDS_SObject::GetAllAttributes()
{
- vector<_PTR(GenericAttribute)> aVector;
+ std::vector<_PTR(GenericAttribute)> aVector;
int aLength = 0;
SALOMEDSClient_GenericAttribute* anAttr;
if (_isLocal) {
SALOMEDS::Locker lock;
- vector<DF_Attribute*> aSeq = _local_impl->GetAllAttributes();
+ std::vector<DF_Attribute*> aSeq = _local_impl->GetAllAttributes();
aLength = aSeq.size();
for (int i = 0; i < aLength; i++) {
anAttr = SALOMEDS_GenericAttribute::CreateAttribute(dynamic_cast<SALOMEDSImpl_GenericAttribute*>(aSeq[i]));
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
_orb = init(0 , 0 ) ;
}
+
+void SALOMEDS_SObject::SetAttrString(const std::string& name, const std::string& value)
+{
+ if(_isLocal)
+ {
+ SALOMEDS::Locker lock;
+ _local_impl->SetAttrString(name,value);
+ }
+ else
+ {
+ _corba_impl->SetAttrString(name.c_str(),value.c_str());
+ }
+}