/*! \brief Clear a study object
*/
void Clear();
+
+/*! \brief Initialization a study object
+*/
+ void Init();
/*! \brief Open a study by url
_corba_impl = SALOMEDS::Study::_duplicate(theStudy);
}
- Init();
+ InitORB();
}
SALOMEDS_Study::~SALOMEDS_Study()
{
}
-void SALOMEDS_Study::Init()
+void SALOMEDS_Study::InitORB()
{
ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
_orb = init(0 , 0 ) ;
}
+void SALOMEDS_Study::Init()
+{
+ if (_isLocal) {
+ SALOMEDS::Locker lock;
+ _local_impl->Init();
+ }
+ else
+ _corba_impl->Init();
+}
+
void SALOMEDS_Study::Clear()
{
if (_isLocal) {
~SALOMEDS_Study();
virtual void Clear();
+ virtual void Init();
virtual bool Open(const std::string& theStudyUrl);
SALOMEDSImpl_Study* GetLocalImpl() { return _local_impl; }
private:
- void Init();
+ void InitORB();
};
#endif
//============================================================================
void SALOMEDS_Study_i::Init()
{
+ if ( !_impl->GetDocument() )
+ _impl->Init();
+
_builder = new SALOMEDS_StudyBuilder_i(_impl->NewBuilder(), _orb);
_notifier = new SALOMEDS::Notifier(_orb);
_genObjRegister = new SALOMEDS::GenObjRegister(_orb);