Version: 6.3.1

src/Session/Session_ServerThread.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  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 
00023 //  SALOME Session : implementation of Session_ServerThread.hxx
00024 //  File   : Session_ServerThread.hxx
00025 //  Author : Paul RASCLE, EDF
00026 //  Module : SALOME
00027 //  $Header: /home/server/cvs/GUI/GUI_SRC/src/Session/Session_ServerThread.hxx,v 1.5.2.1.8.1.12.1 2011-06-01 13:53:42 vsr Exp $
00028 //
00029 #ifndef _SESSION_SERVERTHREAD_HXX_
00030 #define _SESSION_SERVERTHREAD_HXX_
00031 
00032 #include "SALOME_Session.hxx"
00033 
00034 #include <CORBA.h> 
00035 #include <string>
00036 
00037 using namespace std;
00038 
00039 void WaitForServerReadiness(string serverName);
00040 
00041 class SALOME_NamingService;
00042 
00043 class SESSION_EXPORT Session_ServerThread
00044 {
00045 public:
00046   static const int NB_SRV_TYP;
00047   static const char* _serverTypes[];
00048 
00049   Session_ServerThread();
00050   Session_ServerThread(int argc,
00051                        char ** argv, 
00052                        CORBA::ORB_ptr orb, 
00053                        PortableServer::POA_ptr poa);
00054   virtual ~Session_ServerThread();
00055   void         Init();
00056 protected:
00057   void         ActivateModuleCatalog   ( int argc, char ** argv );
00058   void         ActivateSALOMEDS        ( int argc, char ** argv );
00059   void         ActivateRegistry        ( int argc, char ** argv );
00060   void         ActivateContainer       ( int argc, char ** argv );
00061   virtual void ActivateSession         ( int argc, char ** argv );
00062   void         ActivateEngine          ( int argc, char ** argv );
00063   void         ActivateContainerManager( int argc, char ** argv );
00064 protected:
00065   int                     _argc;
00066   char **                 _argv;
00067   int                     _servType;
00068   CORBA::ORB_var          _orb;
00069   PortableServer::POA_var _root_poa;
00070   SALOME_NamingService *  _NS;
00071 };
00072 
00073 class QMutex;
00074 class QWaitCondition;
00075 
00076 class SESSION_EXPORT Session_SessionThread : public Session_ServerThread
00077 {
00078 public:
00079   Session_SessionThread() {}
00080   Session_SessionThread(int argc,
00081                        char** argv, 
00082                        CORBA::ORB_ptr orb, 
00083                        PortableServer::POA_ptr poa,
00084                        QMutex* GUIMutex,
00085                        QWaitCondition* GUILauncher);
00086   virtual ~Session_SessionThread();  
00087 
00088 protected:
00089   virtual void ActivateSession       ( int argc, char ** argv );
00090 private:
00091   QMutex*                 _GUIMutex;
00092   QWaitCondition*         _GUILauncher;
00093 };
00094 
00095 #endif
00096 
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS