| 1 | // toisvr.h
|
|---|
| 2 | // Eric Aubourg CEA/DAPNIA/SPP juillet 1999
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 | #ifndef TOISVR_H
|
|---|
| 6 | #define TOISVR_H
|
|---|
| 7 |
|
|---|
| 8 | #include "toiiter.h"
|
|---|
| 9 | #include <list>
|
|---|
| 10 |
|
|---|
| 11 | class AuxGPS;
|
|---|
| 12 |
|
|---|
| 13 | class RequestHandler {
|
|---|
| 14 | public:
|
|---|
| 15 | virtual bool processTOIReq(string line, string toiname, TOIKind toi, int index,
|
|---|
| 16 | bool interp, bool repet, bool flag, bool notrig)=0;
|
|---|
| 17 | virtual bool processOption(string keyw, string args)=0;
|
|---|
| 18 | };
|
|---|
| 19 |
|
|---|
| 20 | class TOISvr : public RequestHandler {
|
|---|
| 21 | public:
|
|---|
| 22 | TOISvr();
|
|---|
| 23 |
|
|---|
| 24 | void setDirectory(string);
|
|---|
| 25 | void addFile(string);
|
|---|
| 26 | void onBoardRecorderFiles(bool);
|
|---|
| 27 | void useAuxGPS(AuxGPS* gps);
|
|---|
| 28 |
|
|---|
| 29 | void setTimeInterval(double tStart, double tEnd);
|
|---|
| 30 |
|
|---|
| 31 | void addInfo(TOIKind kind, int index, bool triggering=true, bool interp=false);
|
|---|
| 32 | void addInfo(TOIKind kind, bool triggering=true, bool interp=false);
|
|---|
| 33 |
|
|---|
| 34 | void readReq(istream& s);
|
|---|
| 35 |
|
|---|
| 36 | TOIIter doQuery();
|
|---|
| 37 |
|
|---|
| 38 | bool processRequest(string line);
|
|---|
| 39 | void registerReqHandler(RequestHandler*);
|
|---|
| 40 | virtual bool processTOIReq(string line, string toiname, TOIKind toi, int index,
|
|---|
| 41 | bool interp, bool repet, bool flag, bool notrig);
|
|---|
| 42 | virtual bool processOption(string keyw, string args);
|
|---|
| 43 |
|
|---|
| 44 | protected:
|
|---|
| 45 | TOIIter iter;
|
|---|
| 46 | list<RequestHandler*> handlers;
|
|---|
| 47 | };
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 | #endif
|
|---|