MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrConsole.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef lgrConsole_H_
10 #define lgrConsole_H_
11 
12 #include <lgrCore/lgrCore.h>
13 #include <vlutil/vlRunnable.h>
14 #include <vlutil/vlString.h>
15 #include <vlutil/vlSmartPointers.h>
16 
17 #include <list>
18 
19 namespace MAKLogger
20 {
21 
22  class DtLgrFullInterface;
23  class DtLogger;
24 
28  {
29  public:
30 
31  static void allocateConsole();
32  static void deallocateConsole();
33 
35  virtual ~DtLgrConsole();
36 
37  virtual void stop();
38  virtual void run();
39 
40  virtual void setInputHistorySize(int size);
41  virtual int inputHistorySize() const;
42 
43  static void shutdown();
44 
45  protected:
46 
48  virtual void printMessage(const DtString& message);
49 
51  virtual void printFileDoesNotExistMessage(const DtString& filename);
52 
54  virtual void printFileInvalidMessage(const DtString& filename);
55 
57  virtual void printInput(const DtString& input);
58 
60  virtual void clearInput();
61 
63  static DtString dequote(const DtString& input);
64 
67 
69  bool nonBlockingGetLine(DtString& input,bool& changed);
70 
72  virtual void processInput(const DtString& input);
73 
76  virtual void addInputToHistory(const DtString& input);
77 
79  virtual DtString getPreviousInput();
80 
82  virtual DtString getNextInput();
83 
84  void sendShutdown();
85 
86  volatile bool myRunningFlag;
87  DtString myCurrentInput;
89 
90  typedef std::list<DtString> StringList;
91 
93  StringList::iterator myCurrentHistoryInput;
95 
96  static volatile bool myHasConsole;
97 
98  static volatile DtLgrConsole* theConsole;
99  };
100 
101  typedef DtBoost::shared_ptr<DtLgrConsole> DtLgrConsoleSP;
102 
103 }
104 
105 #endif

Document ID: Generated on Thu Apr 7 20:50:59 EDT 2016 from SVN revision 163818
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)