Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[EDF29093] : Quick fix resorbed
[modules/kernel.git]
/
src
/
SALOMEDS
/
SALOMEDS_Study.cxx
diff --git
a/src/SALOMEDS/SALOMEDS_Study.cxx
b/src/SALOMEDS/SALOMEDS_Study.cxx
index 2a14971d7f632ed0283c3130f02e220456d8bd80..8f438d9f4ea55151182b1b355dce427dcfeb514a 100644
(file)
--- a/
src/SALOMEDS/SALOMEDS_Study.cxx
+++ b/
src/SALOMEDS/SALOMEDS_Study.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
19 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
23 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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-53,8
+53,7
@@
#include "SALOMEDS_Driver_i.hxx"
#include "SALOMEDS_Study_i.hxx"
#include "SALOMEDS_Driver_i.hxx"
#include "SALOMEDS_Study_i.hxx"
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
+#include "OpUtil.hxx"
#include "Basics_Utils.hxx"
#include "Basics_Utils.hxx"
@@
-105,9
+104,7
@@
SALOMEDS_Study::~SALOMEDS_Study()
void SALOMEDS_Study::InitORB()
{
void SALOMEDS_Study::InitORB()
{
- ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance();
- ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
- _orb = init(0 , 0 ) ;
+ _orb = KERNEL::GetRefToORB();
}
void SALOMEDS_Study::Init()
}
void SALOMEDS_Study::Init()
@@
-132,10
+129,16
@@
bool SALOMEDS_Study::Open(const std::string& theStudyUrl)
return false;
std::wstring wtheStudyUrl = Kernel_Utils::decode_s( theStudyUrl );
return false;
std::wstring wtheStudyUrl = Kernel_Utils::decode_s( theStudyUrl );
- if (!_corba_impl->Open( (wchar_t*)wtheStudyUrl.c_str() ) )
- return false;
+ return _corba_impl->Open( (wchar_t*)wtheStudyUrl.c_str() );
+}
- return true;
+bool SALOMEDS_Study::CanOpen(const std::string& theStudyUrl)
+{
+ if(CORBA::is_nil(_corba_impl))
+ return false;
+ std::wstring wtheStudyUrl = Kernel_Utils::decode_s( theStudyUrl );
+
+ return _corba_impl->CanOpen( (wchar_t*)wtheStudyUrl.c_str() );
}
bool SALOMEDS_Study::Save(bool theMultiFile, bool theASCII)
}
bool SALOMEDS_Study::Save(bool theMultiFile, bool theASCII)
@@
-347,7
+350,7
@@
std::vector<_PTR(SObject)> SALOMEDS_Study::FindObjectByName(const std::string& a
SALOMEDS::Locker lock;
std::vector<SALOMEDSImpl_SObject> aSeq = _local_impl->FindObjectByName(anObjectName, aComponentName);
SALOMEDS::Locker lock;
std::vector<SALOMEDSImpl_SObject> aSeq = _local_impl->FindObjectByName(anObjectName, aComponentName);
- aLength =
aSeq.size();
+ aLength =
(int)aSeq.size(); //!< TODO: conversion from size_t to int
for (i = 0; i< aLength; i++)
aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i])));
}
for (i = 0; i< aLength; i++)
aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i])));
}
@@
-588,7
+591,7
@@
std::vector<_PTR(SObject)> SALOMEDS_Study::FindDependances(const _PTR(SObject)&
std::vector<SALOMEDSImpl_SObject> aSeq = _local_impl->FindDependances(*(aSO->GetLocalImpl()));
if (aSeq.size()) {
std::vector<SALOMEDSImpl_SObject> aSeq = _local_impl->FindDependances(*(aSO->GetLocalImpl()));
if (aSeq.size()) {
- aLength =
aSeq.size();
+ aLength =
(int)aSeq.size(); //!< TODO: conversion from size_t to int
for (i = 0; i < aLength; i++)
aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i])));
}
for (i = 0; i < aLength; i++)
aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i])));
}