Back to index

salome-gui  6.5.0
Session_Session_i.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //  File   : Session_Session_i.hxx
00023 //  Author : Paul RASCLE, EDF
00024 //  Module : SALOME
00025 
00026 #ifndef _SESSION_SESSION_I_HXX_
00027 #define _SESSION_SESSION_I_HXX_
00028 
00029 #include "SALOME_Session.hxx"
00030 
00031 #include <SALOMEconfig.h>
00032 #include CORBA_SERVER_HEADER(SALOME_Component)
00033 #include CORBA_SERVER_HEADER(SALOME_Session)
00034 class SALOME_NamingService;
00035 
00036 class QMutex;
00037 class QWaitCondition;
00038 
00039 class SESSION_EXPORT SALOME_Session_i:  public virtual POA_SALOME::Session,
00040                          public virtual PortableServer::ServantBase
00041 {
00042 public:
00043   SALOME_Session_i(int argc, 
00044                    char ** argv, 
00045                    CORBA::ORB_ptr orb, 
00046                    PortableServer::POA_ptr poa, 
00047                    QMutex* GUIMutex,
00048                    QWaitCondition* GUILauncher);
00049   ~SALOME_Session_i();
00050 
00052   void GetInterface();
00053 
00055   Engines::EngineComponent_ptr GetComponent(const char* theLibraryName);
00056 
00058   void StopSession();
00059 
00061   SALOME::StatSession GetStatSession();
00062 
00064   void Shutdown();
00065 
00067   void NSregister();
00069   void NSunregister();
00070 
00071   CORBA::Long GetActiveStudyId();
00072 
00073   void ping(){};
00074   CORBA::Long getPID();
00075   char* getHostname();
00076 
00078   bool restoreVisualState(CORBA::Long theSavePoint);
00079 
00081   void emitMessage(const char* theMessage);
00082   void emitMessageOneWay(const char* theMessage);
00083 
00084 protected:
00085 
00087   SALOME_NamingService *_NS;
00088 
00089   int _argc ;
00090   char **_argv;
00091   CORBA::Boolean _isGUI ;
00092   QMutex* _GUIMutex ;
00093   QWaitCondition* _GUILauncher;
00094   int _runningStudies ;
00095   CORBA::ORB_var _orb;
00096   PortableServer::POA_var _poa;
00097   bool _isShuttingDown;
00098 };
00099 
00100 #endif