Back to index

salome-kernel  6.5.0
Functions
SALOMEDS_StudyBuilder.cxx File Reference
#include "utilities.h"
#include "SALOMEDS_StudyBuilder.hxx"
#include "SALOMEDS.hxx"
#include "SALOMEDS_SObject.hxx"
#include "SALOMEDS_SComponent.hxx"
#include "SALOMEDS_GenericAttribute.hxx"
#include "SALOMEDS_StudyManager.hxx"
#include "SALOMEDS_StudyBuilder_i.hxx"
#include "SALOMEDS_Driver_i.hxx"
#include "SALOMEDSImpl_SObject.hxx"
#include "SALOMEDSImpl_SComponent.hxx"
#include "SALOMEDSImpl_GenericAttribute.hxx"
#include <string>
#include <stdexcept>
#include "DF_Attribute.hxx"
#include "Utils_CorbaException.hxx"
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"

Go to the source code of this file.

Functions

 _PTR (SComponent) SALOMEDS_StudyBuilder
 _PTR (SObject) SALOMEDS_StudyBuilder
 _PTR (GenericAttribute) SALOMEDS_StudyBuilder

Function Documentation

_PTR ( SComponent  )

Definition at line 75 of file SALOMEDS_StudyBuilder.cxx.

{
  SALOMEDSClient_SComponent* aSCO = NULL;

  if (_isLocal) {
    CheckLocked();
    SALOMEDS::Locker lock;

    SALOMEDSImpl_SComponent aSCO_impl =_local_impl->NewComponent(ComponentDataType);
    if(!aSCO_impl) return _PTR(SComponent)(aSCO);
    aSCO = new SALOMEDS_SComponent(aSCO_impl);
  }
  else {
    SALOMEDS::SComponent_var aSCO_impl = _corba_impl->NewComponent((char*)ComponentDataType.c_str());
    if(CORBA::is_nil(aSCO_impl)) return _PTR(SComponent)(aSCO);
    aSCO = new SALOMEDS_SComponent(aSCO_impl);
  }

  return _PTR(SComponent)(aSCO);
}

Here is the call graph for this function:

_PTR ( SObject  )

Definition at line 128 of file SALOMEDS_StudyBuilder.cxx.

{
  CheckLocked();

  SALOMEDSClient_SObject* aSO = NULL;
  SALOMEDS_SObject* father = dynamic_cast< SALOMEDS_SObject*>(theFatherObject.get());
  if (father == NULL) return _PTR(SObject)(aSO);
  if (_isLocal) {
    SALOMEDS::Locker lock;

    SALOMEDSImpl_SObject aSO_impl = _local_impl->NewObject(*(father->GetLocalImpl()));
    if(!aSO_impl) return _PTR(SObject)(aSO);
    aSO = new SALOMEDS_SObject(aSO_impl);
  }
  else {
    SALOMEDS::SObject_var aSO_impl = _corba_impl->NewObject(father->GetCORBAImpl());
    if(CORBA::is_nil(aSO_impl)) return _PTR(SObject)(aSO);
    aSO = new SALOMEDS_SObject(aSO_impl);
  }

  return _PTR(SObject)(aSO);
}

Here is the call graph for this function:

_PTR ( GenericAttribute  )

Definition at line 249 of file SALOMEDS_StudyBuilder.cxx.

{  
  SALOMEDSClient_GenericAttribute* anAttr = NULL;
  if(!theSO) return _PTR(GenericAttribute)(anAttr);
  SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO.get());
  if (_isLocal) {
    SALOMEDS::Locker lock;

    SALOMEDSImpl_GenericAttribute* aGA;
    try {
      aGA = dynamic_cast<SALOMEDSImpl_GenericAttribute*>
        (_local_impl->FindOrCreateAttribute(*(aSO->GetLocalImpl()), aTypeOfAttribute));
    }
    catch (...) {
      throw SALOMEDS::StudyBuilder::LockProtection();
    }
    anAttr = SALOMEDS_GenericAttribute::CreateAttribute(aGA);
  }
  else {
    SALOMEDS::GenericAttribute_var aGA =
      _corba_impl->FindOrCreateAttribute(aSO->GetCORBAImpl(), (char*)aTypeOfAttribute.c_str());
    anAttr = SALOMEDS_GenericAttribute::CreateAttribute(aGA);
  }

  return _PTR(GenericAttribute)(anAttr);
}

Here is the call graph for this function: