source: trunk/FACT++/src/Console.h@ 11169

Last change on this file since 11169 was 11053, checked in by tbretz, 14 years ago
Added ConsoleStream class
File size: 1.2 KB
Line 
1#ifndef FACT_Console
2#define FACT_Console
3
4#include "Readline.h"
5#include "WindowLog.h"
6
7class ConsoleStream : public Readline
8{
9private:
10 WindowLog fLogO;
11
12public:
13 ConsoleStream(const char *name);
14
15 // I/O
16 WindowLog &GetStreamOut() { return fLogO; }
17 WindowLog &GetStreamIn() { return fLogO; }
18
19 const WindowLog &GetStreamOut() const { return fLogO; }
20 const WindowLog &GetStreamIn() const { return fLogO; }
21
22 void Run(const char * = 0);
23};
24
25
26
27class Console : public Readline
28{
29private:
30 WindowLog fLogO;
31 WindowLog fLogI;
32
33 bool fContinous;
34public:
35 Console(const char *name);
36 ~Console();
37
38 // Console
39 void SetContinous(bool cont) { fContinous = cont; }
40 bool IsContinous() const { return fContinous; }
41
42 // I/O
43 WindowLog &GetStreamOut() { return fLogO; }
44 WindowLog &GetStreamIn() { return fLogI; }
45
46 const WindowLog &GetStreamOut() const { return fLogO; }
47 const WindowLog &GetStreamIn() const { return fLogI; }
48
49 // Readline
50 bool PrintGeneralHelp();
51 bool PrintCommands();
52 bool PrintKeyBindings();
53
54 bool Process(const std::string &str);
55
56 std::string GetLinePrompt() const;
57
58 void Startup();
59 void EventHook();
60 void Run(const char * = 0);
61};
62
63#endif
Note: See TracBrowser for help on using the repository browser.