/**
* This returns a static reference to the SALOME study. The
* study can be used to get informations about it.
+ * \sa getStudyServantSA
*/
SALOMEDS::Study_ptr getStudyServant() {
static SALOMEDS::Study_ptr aStudy;
// Author: Guillaume Boulant (EDF/R&D)
-#ifndef __KERNEL_SERVICES_H__
-#define __KERNEL_SERVICES_H__
+#pragma once
#include "KernelHelpers.hxx"
#include "Utils_CorbaException.hxx"
// Tip: CORBA exceptions can be used with LOG (or more generally in streams)
// Ex: LOG("An exception occurs: "<<e) will log the data of the exception e
-
-#endif // KERNEL_SERVICES
SALOME_INSTALL_SCRIPTS(SALOME_DriverPy.py ${SALOME_INSTALL_SCRIPT_PYTHON})
SET(COMMON_HEADERS_HXX
+ SALOMEDS_SComponentIterator_i.hxx
+ SALOMEDS_StudyBuilder_i.hxx
+ SALOMEDS_UseCaseBuilder_i.hxx
SALOMEDS_Driver_i.hxx
SALOMEDS_Study_i.hxx
SALOMEDS_Study.hxx
static PortableServer::POA_ptr _poa;
+/**
+ * Return a unique study obj but servant is embeded here.
+ *
+ */
+SALOMEDS::Study_ptr KERNEL::getStudyServantSA()
+{
+ static SALOMEDS::Study_var aStudy;
+ if(CORBA::is_nil(aStudy))
+ {
+ CORBA::ORB_ptr orb = KERNEL::getORB();
+ SALOMEDS_Study_i *servant = new SALOMEDS_Study_i(orb);
+ aStudy = servant->_this();
+ }
+ return SALOMEDS::Study::_duplicate(aStudy);
+}
+
namespace SALOMEDS
{
class Notifier: public SALOMEDSImpl_AbstractCallback
// Author : Sergey RUIN
// Module : SALOME
//
-#ifndef __SALOMEDS_STUDY_I_H__
-#define __SALOMEDS_STUDY_I_H__
+#pragma once
// std C++ headers
#include <iostream>
#include "SALOMEDSImpl_Study.hxx"
#include "SALOMEDSImpl_AttributeIOR.hxx"
+namespace KERNEL
+{
+ Standard_EXPORT SALOMEDS::Study_ptr getStudyServantSA();
+}
+
class Standard_EXPORT SALOMEDS_Study_i: public POA_SALOMEDS::Study
{
private:
virtual void attach(SALOMEDS::Observer_ptr theObs, CORBA::Boolean modify);
virtual void detach(SALOMEDS::Observer_ptr theObs);
};
-#endif