| Last change
 on this file since 4462 was             4462, checked in by Christoph Mayer, 16 years ago | 
        
          | 
startup wrapper für gui gefixt
 | 
        
          | File size:
            595 bytes | 
      
      
| Rev | Line |  | 
|---|
|  | 1 | #include <string> | 
|---|
|  | 2 | #include "ariba/utility/system/StartupWrapper.h" | 
|---|
|  | 3 | #include "PingPong.h" | 
|---|
|  | 4 |  | 
|---|
|  | 5 | using std::string; | 
|---|
|  | 6 | using ariba::utility::StartupWrapper; | 
|---|
|  | 7 | using ariba::application::pingpong::PingPong; | 
|---|
|  | 8 |  | 
|---|
|  | 9 | int main( int argc, char** argv ) { | 
|---|
|  | 10 |  | 
|---|
|  | 11 | // get config file | 
|---|
|  | 12 | string config = "../etc/settings.cnf"; | 
|---|
|  | 13 | if (argc >= 2) config = argv[1]; | 
|---|
|  | 14 |  | 
|---|
|  | 15 | StartupWrapper::initConfig( config ); | 
|---|
|  | 16 | StartupWrapper::initSystem(); | 
|---|
|  | 17 |  | 
|---|
|  | 18 | // this will do the main functionality and block | 
|---|
|  | 19 | PingPong ping; | 
|---|
|  | 20 | StartupWrapper::startup(&ping); | 
|---|
|  | 21 |  | 
|---|
|  | 22 | // --> we will run blocking until <enter> is hit | 
|---|
|  | 23 |  | 
|---|
|  | 24 | StartupWrapper::shutdown(&ping); | 
|---|
|  | 25 | return 0; | 
|---|
|  | 26 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.