Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _SESSION_SERVERLAUNCHER_HXX_
00030 #define _SESSION_SERVERLAUNCHER_HXX_
00031
00032 #include "SALOME_Session.hxx"
00033
00034 #include <CORBA.h>
00035 #include <list>
00036 #include <vector>
00037 #include <string>
00038 #include <QThread>
00039
00040 using namespace std;
00041
00042 class SESSION_EXPORT ServArg
00043 {
00044 public:
00045 int _servType;
00046 int _firstArg;
00047 int _lastArg;
00048 inline ServArg(int servType=0, int firstArg=0, int lastArg=0);
00049 };
00050
00051 inline ServArg::ServArg(int servType, int firstArg, int lastArg):
00052 _servType(servType),_firstArg(firstArg),_lastArg(lastArg)
00053 {}
00054
00055 class Session_ServerThread;
00056
00057 class QMutex;
00058 class QWaitCondition;
00059
00060 class SESSION_EXPORT Session_ServerLauncher: public QThread
00061 {
00062 public:
00063 Session_ServerLauncher();
00064 Session_ServerLauncher(int argc,
00065 char ** argv,
00066 CORBA::ORB_ptr orb,
00067 PortableServer::POA_ptr poa,
00068 QMutex *GUIMutex,
00069 QWaitCondition *ServerLaunch,
00070 QMutex *SessionMutex,
00071 QWaitCondition *SessionStarted);
00072 virtual ~Session_ServerLauncher();
00073 void run();
00074 void KillAll();
00075
00076 protected:
00077 void CheckArgs();
00078 void ActivateAll();
00079
00080 private:
00081 int _argc;
00082 char ** _argv;
00083 CORBA::ORB_var _orb;
00084 PortableServer::POA_var _root_poa;
00085 QMutex* _GUIMutex;
00086 QWaitCondition* _ServerLaunch;
00087 QMutex* _SessionMutex;
00088 QWaitCondition* _SessionStarted;
00089 list<ServArg> _argServToLaunch;
00090 vector<string> _argCopy;
00091 list<Session_ServerThread*> _serverThreads;
00092 };
00093
00094 #endif
00095