Back to index

salome-kernel  6.5.0
SALOMEDS_StudyManager.cxx File Reference
#include "SALOMEDS_StudyManager.hxx"
#include "SALOMEDS.hxx"
#include "SALOMEDS_Study.hxx"
#include "SALOMEDS_SObject.hxx"
#include "SALOMEDS_Driver_i.hxx"
#include "SALOMEDSImpl_Study.hxx"
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"
#include "Basics_Utils.hxx"
#include <sys/types.h>
#include <unistd.h>

Go to the source code of this file.


SALOMEDS_Driver_i * GetDriver (const SALOMEDSImpl_SObject &theObject, CORBA::ORB_ptr orb)
 _PTR (Study) SALOMEDS_StudyManager
 _PTR (SObject) SALOMEDS_StudyManager

Function Documentation

_PTR ( Study  )

Definition at line 103 of file SALOMEDS_StudyManager.cxx.

  //SRN: Pure CORBA NewStudy as it does more initialization than the local one   
  SALOMEDSClient_Study* aStudy = NULL;

  SALOMEDS::Study_var aStudy_impl = _corba_impl->NewStudy((char*)study_name.c_str());
  if(CORBA::is_nil(aStudy_impl)) return _PTR(Study)(aStudy);
  aStudy = new SALOMEDS_Study(aStudy_impl);

  return _PTR(Study)(aStudy);
_PTR ( SObject  )

Definition at line 279 of file SALOMEDS_StudyManager.cxx.

  SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO.get());
  SALOMEDSClient_SObject* aResult = NULL;

  if (_isLocal) {
    SALOMEDS::Locker lock;

    SALOMEDSImpl_SObject aSO_impl = *(aSO->GetLocalImpl());
    SALOMEDS_Driver_i* aDriver = GetDriver(aSO_impl, _orb);
    SALOMEDSImpl_SObject aNewSO = _local_impl->Paste(aSO_impl, aDriver);
    delete aDriver;
    if(aNewSO.IsNull()) return _PTR(SObject)(aResult);
    aResult = new SALOMEDS_SObject(aNewSO);
  else {
    SALOMEDS::SObject_ptr aNewSO = _corba_impl->Paste(aSO->GetCORBAImpl());
    if(CORBA::is_nil(aNewSO)) return _PTR(SObject)(aResult);
    aResult = new SALOMEDS_SObject(aNewSO);

  return _PTR(SObject)(aResult);

Here is the call graph for this function:

SALOMEDS_Driver_i * GetDriver ( const SALOMEDSImpl_SObject &  theObject,
CORBA::ORB_ptr  orb 

Definition at line 311 of file SALOMEDS_StudyManager.cxx.

  SALOMEDS_Driver_i* driver = NULL;
  SALOMEDSImpl_SComponent aSCO = theObject.GetFatherComponent();
  if(!aSCO.IsNull()) {
    std::string IOREngine = aSCO.GetIOR();
    if(!IOREngine.empty()) {
      CORBA::Object_var obj = orb->string_to_object(IOREngine.c_str());
      SALOMEDS::Driver_var Engine = SALOMEDS::Driver::_narrow(obj) ;
      driver = new SALOMEDS_Driver_i(Engine, orb);

  return driver;

Here is the caller graph for this function: