MAK Data Logger API Documentation for DIS
lgrSystemInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef lgrSystemInterface_H_
11 #define lgrSystemInterface_H_
12 
13 #include "lgrCore.h"
14 #include "lgrInterface.h"
15 #include "virtualConstructor.h"
16 #include "signalSlot.h"
17 #include "threadSafe.h"
18 
19 #include <memory>
20 
21 namespace MAKLogger
22 {
23  class DtLgrSystemCommandFactory;
24  class DtLgrMessageOutputListener;
25 
30  {
31  public:
32 
34 
37 
38 
39  virtual ~DtLgrSystemInterface();
40 
41  private:
43  DtLgrSystemInterface(const DtLgrSystemInterface&);
45  DtLgrSystemInterface& operator=(const DtLgrSystemInterface&);
46  public:
47 
49  virtual void issueTextCommand(const DtString& commandString) const;
50 
52  virtual void cancelLongOperation() const;
53 
55  virtual void deleteFile(const DtString& filename) const;
56 
58  virtual void setNotifyLevel(int vlLevel,int lgrLevel) const;
59 
61  virtual void shutdown() const;
62 
64  virtual bool timeToShutdown() const;
65 
67  virtual const DtString& operationName() const;
68 
70  virtual const DtString& operationMessage() const;
71 
73  virtual int operationProgress() const;
74 
76  virtual bool operationInterruptible() const;
77 
79  virtual bool wasOperationCanceled() const;
80 
82  virtual void installOutputListener(
83  std::auto_ptr<DtLgrMessageOutputListener> listener) const;
84 
86  DtValueSignal<DtString> messageSignal;
87 
89  DtValueSignal<DtString> consoleMessageSignal;
90 
93  DtValueSignal<bool> operationSignal;
94 
96  DtValueSignal<bool> shutdownSignal;
97 
99  DtValueSignal<DtString> operationMessageSignal;
100 
102  DtValueSignal<int> operationProgressSignal;
103 
105  bool basicGuiFlag() const;
106 
107  protected:
108  void connectResponseHandler(DtLgrCommandId id,
109  void (DtLgrSystemInterface::* function)(DtResponse));
110 
111  void messageReceived(DtResponse);
112  void consoleMessageReceived(DtResponse);
113  void requestShutdown(DtResponse);
114 
115  void basicGuiFlagSet(DtResponse);
116 
117  void longOperationStarted(DtResponse);
118  void longOperationFinished(DtResponse);
119  void longOperationUpdated(DtResponse);
120 
121  DtThreadSafe<bool>* myCancelFlag;
122  DtString myMessage;
123  DtString myConsoleMessage;
124 
125  DtString myOperationName;
126  DtString myOperationMessage;
127  bool myOperationRunningFlag;
128  int myOperationProgress;
129  bool myOperationInterruptible;
130  bool myOperationCanceledFlag;
131 
132  bool myTimeToShutdown;
133  bool myBasicGuiFlag;
134  };
135 
136 }
137 
138 #endif

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)