SALOMEDS::Locker lock;
aSO = new SALOMEDS_SObject(_local_impl->Value());
}
- else aSO = new SALOMEDS_SObject(_corba_impl->Value());
+ else {
+ SALOMEDS::SObject_var so=_corba_impl->Value();
+ aSO = new SALOMEDS_SObject(so);
+ }
return _PTR(SObject)(aSO);
}
SALOMEDS::unlock();
bool isOk = _driver->CanCopy(so.in());
+ so->Destroy();
SALOMEDS::lock();
return isOk;
aType = _local_impl->Type();
}
else {
- aType = _corba_impl->Type();
+ aType = (CORBA::String_var)_corba_impl->Type();
}
return aType;
}
aType = _local_impl->GetClassType();
}
else {
- aType = _corba_impl->GetClassType();
+ aType = (CORBA::String_var)_corba_impl->GetClassType();
}
return aType;
}
aSO = new SALOMEDS_SObject(_local_impl->GetSObject());
}
else {
- aSO = new SALOMEDS_SObject(_corba_impl->GetSObject());
+ aSO = new SALOMEDS_SObject((SALOMEDS::SObject_var)_corba_impl->GetSObject());
}
return _PTR(SObject)(aSO);
{
SALOMEDS_GenericAttribute* aGA = NULL;
if(!CORBA::is_nil(theGA)) {
- std::string aTypeOfAttribute = theGA->GetClassType();
+ CORBA::String_var astr=theGA->GetClassType();
+ std::string aTypeOfAttribute = astr.in();
__CreateGenericClientAttributeCORBA
}
return aGA;
return CORBA::string_dup(type.c_str());
}
- return (char*)"";
+ return CORBA::string_dup("");
}
char* SALOMEDS_GenericAttribute_i::GetClassType()
return CORBA::string_dup(class_type.c_str());
}
- return (char*)"";
+ return CORBA::string_dup("");
}
SALOMEDS::Locker lock;
aType = (dynamic_cast<SALOMEDSImpl_SComponent*>(GetLocalImpl()))->ComponentDataType();
}
- else aType = (SALOMEDS::SComponent::_narrow(GetCORBAImpl()))->ComponentDataType();
+ else
+ {
+ SALOMEDS::SComponent_var aCompo=SALOMEDS::SComponent::_narrow(GetCORBAImpl());
+ CORBA::String_var aString = aCompo->ComponentDataType();
+ aType=aString.in();
+ }
return aType;
}
SALOMEDS::SComponent_ptr SALOMEDS_SComponent::GetSComponent()
{
if(_isLocal) {
- if(!CORBA::is_nil(_corba_impl)) return SALOMEDS::SComponent::_duplicate(SALOMEDS::SComponent::_narrow(GetCORBAImpl()));
+ if(!CORBA::is_nil(_corba_impl)) return SALOMEDS::SComponent::_narrow(GetCORBAImpl());
SALOMEDS::SComponent_var aSCO = SALOMEDS_SComponent_i::New(*(dynamic_cast<SALOMEDSImpl_SComponent*>(GetLocalImpl())), _orb);
_corba_impl = SALOMEDS::SComponent::_duplicate(aSCO);
return aSCO._retn();
}
else {
- return SALOMEDS::SComponent::_duplicate(SALOMEDS::SComponent::_narrow(GetCORBAImpl()));
+ return SALOMEDS::SComponent::_narrow(GetCORBAImpl());
}
return SALOMEDS::SComponent::_nil();
}
SALOMEDS::Locker lock;
aSCO = new SALOMEDS_SComponent(_local_impl->Value());
}
- else aSCO = new SALOMEDS_SComponent(_corba_impl->Value());
+ else aSCO = new SALOMEDS_SComponent((SALOMEDS::SComponent_var)_corba_impl->Value());
return _PTR(SComponent)(aSCO);
}
SALOMEDS::Locker lock;
aValue = _local_impl->GetID();
}
- else aValue = _corba_impl->GetID();
+ else aValue = (CORBA::String_var)_corba_impl->GetID();
return aValue;
}
SALOMEDS::Locker lock;
return _PTR(SComponent)(new SALOMEDS_SComponent(_local_impl->GetFatherComponent()));
}
- return _PTR(SComponent)(new SALOMEDS_SComponent(_corba_impl->GetFatherComponent()));
+ return _PTR(SComponent)(new SALOMEDS_SComponent((SALOMEDS::SComponent_var)_corba_impl->GetFatherComponent()));
}
_PTR(SObject) SALOMEDS_SObject::GetFather()
SALOMEDS::Locker lock;
return _PTR(SObject)(new SALOMEDS_SObject(_local_impl->GetFather()));
}
- return _PTR(SObject)(new SALOMEDS_SObject(_corba_impl->GetFather()));
+ return _PTR(SObject)(new SALOMEDS_SObject((SALOMEDS::SObject_var)_corba_impl->GetFather()));
}
bool SALOMEDS_SObject::FindAttribute(_PTR(GenericAttribute)& anAttribute,
SALOMEDS::Locker lock;
return _PTR(Study)(new SALOMEDS_Study(_local_impl->GetStudy()));
}
- return _PTR(Study)(new SALOMEDS_Study(_corba_impl->GetStudy()));
+ SALOMEDS::Study_var study=_corba_impl->GetStudy();
+ return _PTR(Study)(new SALOMEDS_Study(study));
}
std::string SALOMEDS_SObject::Name()
SALOMEDS::Locker lock;
aName = _local_impl->Name();
}
- else aName = _corba_impl->Name();
+ else aName = (CORBA::String_var)_corba_impl->Name();
return aName;
}
SALOMEDS::Locker lock;
aName = _local_impl->GetName();
}
- else aName = _corba_impl->GetName();
+ else aName = (CORBA::String_var) _corba_impl->GetName();
return aName;
}
SALOMEDS::Locker lock;
aComment = _local_impl->GetComment();
}
- else aComment = _corba_impl->GetComment();
+ else aComment = (CORBA::String_var) _corba_impl->GetComment();
return aComment;
}
SALOMEDS::Locker lock;
anIOR = _local_impl->GetIOR();
}
- else anIOR = _corba_impl->GetIOR();
+ else anIOR = (CORBA::String_var) _corba_impl->GetIOR();
return anIOR;
}
CORBA::Object_ptr GetObject();
SALOMEDS::SObject_ptr GetSObject();
- SALOMEDS::SObject_ptr GetCORBAImpl() { return SALOMEDS::SObject::_duplicate(_corba_impl); }
+ SALOMEDS::SObject_var GetCORBAImpl() { return _corba_impl; }
SALOMEDSImpl_SObject* GetLocalImpl() { return _local_impl; }
private:
SALOMEDS::Locker lock;
DF_Attribute* anAttr = NULL;
if(_impl->FindAttribute(anAttr, (char*)aTypeOfAttribute)) {
- anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb));
+ anAttribute = SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb);
return true;
}
for(int i = 0; i < length; i++) {
SALOMEDSImpl_GenericAttribute* anAttr = dynamic_cast<SALOMEDSImpl_GenericAttribute*>(aSeq[i]);
SALOMEDS::GenericAttribute_var anAttribute;
- anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb));
+ anAttribute = SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb);
if (!CORBA::is_nil(anAttribute)) {
SeqOfAttr[i] = anAttribute;
}