-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#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 "DF_Attribute.hxx"
#include "Utils_CorbaException.hxx"
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
+#include "OpUtil.hxx"
pthread_mutex_t SALOMEDS_StudyBuilder::_remoteBuilderMutex;
return _PTR(SObject)(aSO);
}
-void SALOMEDS_StudyBuilder::AddDirectory(const std::string& thePath)
-{
- if (_isLocal) {
- CheckLocked();
- SALOMEDS::Locker lock;
-
- _local_impl->AddDirectory((char*)thePath.c_str());
- if (_local_impl->IsError()) {
- std::string anErrorCode = _local_impl->GetErrorCode();
- if (anErrorCode == "StudyNameAlreadyUsed") throw SALOMEDS::Study::StudyNameAlreadyUsed();
- if (anErrorCode == "StudyInvalidDirectory") throw SALOMEDS::Study::StudyInvalidDirectory();
- if (anErrorCode == "StudyInvalidComponent") throw SALOMEDS::Study::StudyInvalidComponent();
- }
- }
- else _corba_impl->AddDirectory((char*)thePath.c_str());
-}
-
void SALOMEDS_StudyBuilder::LoadWith(const _PTR(SComponent)& theSCO, const std::string& theIOR)
{
if(!theSCO) return;
void SALOMEDS_StudyBuilder::init_orb()
{
- ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance();
- ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
- _orb = init(0 , 0 );
+ _orb = KERNEL::GetRefToORB();
}