CMS 3D CMS Logo

IgSocketDriver.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "Iguana/WebFramework/interface/IgSocketDriver.h"
00004 #include "Iguana/WebFramework/interface/IgServerSocket.h"
00005 #include "Iguana/WebFramework/interface/IgSession.h"
00006 #include "Iguana/WebFramework/interface/IgWebServiceRegistry.h"
00007 #include "Iguana/WebFramework/interface/IgSocketDriverInfo.h"
00008 #include "Iguana/WebFramework/interface/IgServerPool.h"
00009 #include "Iguana/Studio/interface/IgQtAppLoopService.h"
00010 #include "Iguana/Framework/interface/IgArgsElement.h"
00011 
00012 #include <qapplication.h>
00013 
00014 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00015 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00016 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00017 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00018 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00019 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00020 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00021 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00022 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00023 
00024 IgSocketDriver::IgSocketDriver (IgState *state)
00025     :m_state (state)
00026 {
00027 }
00028 
00029 int
00030 IgSocketDriver::run (void)
00031 {
00032     IgArgsElement *args = IgArgsElement::get (m_state);
00033     
00034 
00035     QApplication *app = new QApplication (args->args (), 
00036                                           args->argv ());
00037 
00038     IgQtAppLoopService *loopService = new IgQtAppLoopService (m_state);    
00039     IgSocketDriverInfo *info = new IgSocketDriverInfo (m_state);    
00040     new IgWebServiceRegistry (m_state);    
00041 
00042     std::vector <std::string> serverOpts;
00043     serverOpts.push_back ("--ig-server");
00044     if (args->exists (serverOpts))
00045         IgServerPool::getInstance (m_state);
00046     
00047     info->setSocket (new IgServerSocket (m_state, true));
00048     loopService->run ();        
00049     
00050     app->exec ();    
00051     return 0;    
00052 }
00053 
00054 const char *
00055 IgSocketDriver::catalogLabel (void)
00056 {
00057     return "SOCKET";    
00058 }
00059 

Generated on Tue Jun 9 17:39:04 2009 for CMSSW by  doxygen 1.5.4