{
SALOMEDS_SComponent* aSCO = NULL;
TCollection_AsciiString aName((char*)aComponentName);
- if(_isLocal) aSCO = new SALOMEDS_SComponent(_local_impl->FindComponent(aName));
- else aSCO = new SALOMEDS_SComponent(_corba_impl->FindComponent(aName.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->FindComponent(aName);
+ if(aSCO_impl.IsNull()) return NULL;
+ aSCO = new SALOMEDS_SComponent(aSCO_impl);
+ }
+ else {
+ SALOMEDS::SComponent_var aSCO_impl = _corba_impl->FindComponent(aName.ToCString());
+ if(CORBA::is_nil(aSCO_impl)) return NULL;
+ aSCO = new SALOMEDS_SComponent(aSCO_impl);
+ }
return aSCO;
}
{
SALOMEDS_SComponent* aSCO = NULL;
TCollection_AsciiString anID((char*)aComponentID);
- if(_isLocal) aSCO = new SALOMEDS_SComponent(_local_impl->FindComponentID(anID));
- else aSCO = new SALOMEDS_SComponent(_corba_impl->FindComponentID(anID.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->FindComponentID(anID);
+ if(aSCO_impl.IsNull()) return NULL;
+ aSCO = new SALOMEDS_SComponent(aSCO_impl);
+ }
+ else {
+ SALOMEDS::SComponent_var aSCO_impl = _corba_impl->FindComponentID(anID.ToCString());
+ if(CORBA::is_nil(aSCO_impl)) return NULL;
+ aSCO = new SALOMEDS_SComponent(aSCO_impl);
+ }
return aSCO;
}
{
SALOMEDS_SObject* aSO = NULL;
TCollection_AsciiString aName((char*)anObjectName);
- if(_isLocal) aSO = new SALOMEDS_SObject(_local_impl->FindObject(aName));
- else aSO = new SALOMEDS_SObject(_corba_impl->FindObject(aName.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObject(aName);
+ if(aSO_impl.IsNull()) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
+ else {
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObject(aName.ToCString());
+ if(CORBA::is_nil(aSO_impl)) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
return aSO;
}
{
SALOMEDS_SObject* aSO = NULL;
TCollection_AsciiString anID((char*)anObjectID);
- if(_isLocal) aSO = new SALOMEDS_SObject(_local_impl->FindObjectID(anID));
- else aSO = new SALOMEDS_SObject(_corba_impl->FindObjectID(anID.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectID(anID);
+ if(aSO_impl.IsNull()) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
+ else {
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObjectID(anID.ToCString());
+ if(CORBA::is_nil(aSO_impl)) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
return aSO;
}
{
SALOMEDS_SObject* aSO = NULL;
TCollection_AsciiString anIOR((char*)anObjectIOR);
- if(_isLocal) aSO = new SALOMEDS_SObject(_local_impl->FindObjectIOR(anIOR));
- else aSO = new SALOMEDS_SObject(_corba_impl->FindObjectIOR(anIOR.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectIOR(anIOR);
+ if(aSO_impl.IsNull()) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
+ else {
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObjectIOR(anIOR.ToCString());
+ if(CORBA::is_nil(aSO_impl)) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
return aSO;
}
{
SALOMEDS_SObject* aSO = NULL;
TCollection_AsciiString aPath((char*)thePath);
- if(_isLocal) aSO = new SALOMEDS_SObject(_local_impl->FindObjectByPath(aPath));
- else aSO = new SALOMEDS_SObject(_corba_impl->FindObjectByPath(aPath.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectByPath(aPath);
+ if(aSO_impl.IsNull()) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
+ else {
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObjectByPath(aPath.ToCString());
+ if(CORBA::is_nil(aSO_impl)) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
return aSO;
}
SALOMEDS_SComponent* aSCO = NULL;
TCollection_AsciiString aType((char*)ComponentDataType);
- if(_isLocal)
- aSCO = new SALOMEDS_SComponent(_local_impl->NewComponent(aType));
- else
- aSCO = new SALOMEDS_SComponent(_corba_impl->NewComponent(aType.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->NewComponent(aType);
+ if(aSCO_impl.IsNull()) return NULL;
+ aSCO = new SALOMEDS_SComponent(aSCO_impl);
+ }
+ else {
+ SALOMEDS::SComponent_var aSCO_impl = _corba_impl->NewComponent(aType.ToCString());
+ if(CORBA::is_nil(aSCO_impl)) return NULL;
+ aSCO = new SALOMEDS_SComponent(aSCO_impl);
+ }
return aSCO;
}
SALOMEDS_SObject* aSO = NULL;
SALOMEDS_SObject* father = dynamic_cast< SALOMEDS_SObject*>(theFatherObject);
if(father == NULL) return aSO;
- if(_isLocal) aSO = new SALOMEDS_SObject(_local_impl->NewObject(father->GetLocalImpl()));
- else aSO = new SALOMEDS_SObject(_corba_impl->NewObject(father->GetCORBAImpl()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->NewObject(father->GetLocalImpl());
+ if(aSO_impl.IsNull()) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
+ else {
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->NewObject(father->GetCORBAImpl());
+ if(CORBA::is_nil(aSO_impl)) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
return aSO;
}
SALOMEDS_SObject* aSO = NULL;
SALOMEDS_SObject* father = dynamic_cast< SALOMEDS_SObject*>(theFatherObject);
if(father == NULL) return aSO;
- if(_isLocal) aSO = new SALOMEDS_SObject(_local_impl->NewObjectToTag(father->GetLocalImpl(), theTag));
- else aSO = new SALOMEDS_SObject(_corba_impl->NewObjectToTag(father->GetCORBAImpl(), theTag));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->NewObjectToTag(father->GetLocalImpl(), theTag);
+ if(aSO_impl.IsNull()) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
+ else {
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->NewObjectToTag(father->GetCORBAImpl(), theTag);
+ if(CORBA::is_nil(aSO_impl)) return NULL;
+ aSO = new SALOMEDS_SObject(aSO_impl);
+ }
return aSO;
SALOMEDS_Study* aStudy;
TCollection_AsciiString aName((char*)study_name);
- if(_isLocal) aStudy = new SALOMEDS_Study(_local_impl->NewStudy(aName));
- else aStudy = new SALOMEDS_Study(_corba_impl->NewStudy(aName.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->NewStudy(aName);
+ if(aStudy_impl.IsNull()) return NULL;
+ aStudy = new SALOMEDS_Study(aStudy_impl);
+ }
+ else {
+ SALOMEDS::Study_var aStudy_impl = _corba_impl->NewStudy(aName.ToCString());
+ if(CORBA::is_nil(aStudy_impl)) return NULL;
+ aStudy = new SALOMEDS_Study(aStudy_impl);
+ }
return aStudy;
}
SALOMEDS_Study* aStudy;
TCollection_AsciiString aName((char*)theStudyUrl);
- if(_isLocal) aStudy = new SALOMEDS_Study(_local_impl->Open(aName));
- else aStudy = new SALOMEDS_Study(_corba_impl->Open(aName.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->Open(aName);
+ if(aStudy_impl.IsNull()) return NULL;
+ aStudy = new SALOMEDS_Study(aStudy_impl);
+ }
+ else {
+ SALOMEDS::Study_var aStudy_impl = _corba_impl->Open(aName.ToCString());
+ if(CORBA::is_nil(aStudy_impl)) return NULL;
+ aStudy = new SALOMEDS_Study(aStudy_impl);
+ }
return aStudy;
}
{
SALOMEDS_Study* aStudy = NULL;
TCollection_AsciiString aName((char*)theStudyName);
- if(_isLocal) aStudy = new SALOMEDS_Study(_local_impl->GetStudyByName(aName));
- else aStudy = new SALOMEDS_Study(_corba_impl->GetStudyByName(aName.ToCString()));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->GetStudyByName(aName);
+ if(aStudy_impl.IsNull()) return NULL;
+ aStudy = new SALOMEDS_Study(aStudy_impl);
+ }
+ else {
+ SALOMEDS::Study_var aStudy_impl = _corba_impl->GetStudyByName(aName.ToCString());
+ if(CORBA::is_nil(aStudy_impl)) return NULL;
+ aStudy = new SALOMEDS_Study(aStudy_impl);
+ }
return aStudy;
}
SALOMEDSClient_Study* SALOMEDS_StudyManager::GetStudyByID(int theStudyID)
{
SALOMEDS_Study* aStudy = NULL;
- if(_isLocal) aStudy = new SALOMEDS_Study(_local_impl->GetStudyByID(theStudyID));
- else aStudy = new SALOMEDS_Study(_corba_impl->GetStudyByID(theStudyID));
+ if(_isLocal) {
+ Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->GetStudyByID(theStudyID);
+ if(aStudy_impl.IsNull()) return NULL;
+ aStudy = new SALOMEDS_Study(aStudy_impl);
+ }
+ else {
+ SALOMEDS::Study_var aStudy_impl = _corba_impl->GetStudyByID(theStudyID);
+ if(CORBA::is_nil(aStudy_impl)) return NULL;
+ aStudy = new SALOMEDS_Study(aStudy_impl);
+ }
return aStudy;
}
{
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
//SRN: Pure CORBA call as SALOMEDS::Driver required for this method
- SALOMEDS_SObject* aResultSO = new SALOMEDS_SObject(_corba_impl->Paste(aSO->GetCORBAImpl()));
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->Paste(aSO->GetCORBAImpl());
+ if(CORBA::is_nil(aSO_impl)) return NULL;
+ SALOMEDS_SObject* aResultSO = new SALOMEDS_SObject(aSO_impl);
return aResultSO;
}