Changeset 12956 for trunk/FACT++/src


Ignore:
Timestamp:
02/29/12 10:01:59 (13 years ago)
Author:
tbretz
Message:
To dfine the virtual Run() function a new class MainImp is used now instead of the full state machine class.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Main.h

    r12824 r12956  
    1 #ifndef FACT_MAIN
    2 #define FACT_MAIN
     1#ifndef FACT_Main
     2#define FACT_Main
    33
    44#include <map>
     
    66#include <functional>
    77
    8 #include "LocalControl.h"
     8#include <boost/filesystem.hpp>
     9
     10#include "Dim.h"
     11#include "Time.h"
     12#include "MainImp.h"
     13#include "Readline.h"
     14#include "WindowLog.h"
     15#include "MessageImp.h"
    916#include "Configuration.h"
    1017
    1118namespace Main
    1219{
     20    using namespace std;
     21
    1322    void SetupConfiguration(Configuration &conf)
    1423    {
     
    2433            ("console,c",  var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
    2534            ("cmd",        vars<string>(), "Execute one or more commands at startup")
    26             ("exec,e",     vars<string>(), "Execute one or more scrips at startup")
     35            ("exec,e",     vars<string>(), "Execute one or more scrips at startup ('file:N' - start at label N)")
    2736            ("quit",       po_switch(),    "Quit after startup");
    2837        ;
     
    3241
    3342        conf.AddOptions(config);
     43    }
     44
     45    void PrintUsage()
     46    {
     47        cout <<
     48            "Files:\n"
     49            "The following files are written by each program by default\n"
     50            "  program.evt:   A log of all executed of skipped events\n"
     51            "  program.his:   The history accessible by Pg-up/dn\n"
     52            "  program.log:   All output piped to the log-stream"
     53            << endl;
    3454    }
    3555
     
    4969    }
    5070
    51     void Thread(StateMachineImp *io_service, bool dummy)
     71    void Thread(MainImp *io_service, bool dummy)
    5272    {
    5373        // This is necessary so that the StateMachien Thread can signal the
  • trunk/FACT++/src/StateMachineImp.h

    r11928 r12956  
    77#include <vector>
    88
     9#include "MainImp.h"
    910#include "MessageImp.h"
    1011
     
    1213class EventImp;
    1314
    14 class StateMachineImp : public MessageImp
     15class StateMachineImp : public MainImp, public MessageImp
    1516{
    1617public:
Note: See TracChangeset for help on using the changeset viewer.