/[svn]/linuxsampler/branches/release2_1_1/src/shell/TerminalPrinter.h
ViewVC logotype

Contents of /linuxsampler/branches/release2_1_1/src/shell/TerminalPrinter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3538 - (show annotations) (download) (as text)
Sat Jul 27 11:23:38 2019 UTC (4 years, 10 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 836 byte(s)
Created linuxsampler branch 'release2_1_1'.

1 /*
2 * LSCP Shell
3 *
4 * Copyright (c) 2014 Christian Schoenebeck
5 *
6 * This program is part of LinuxSampler and released under the same terms.
7 */
8
9 #ifndef TERMINALPRINTER_H
10 #define TERMINALPRINTER_H
11
12 #include <string>
13
14 /**
15 * Simple helper class that remembers the amount of lines advanced on the
16 * terminal (since this object was constructed) by printing out text to the
17 * terminal with this class. This way the content been printed on the terminal
18 * can completely be erased afterwards once necessary.
19 */
20 class TerminalPrinter {
21 public:
22 TerminalPrinter();
23 virtual ~TerminalPrinter();
24 int linesAdvanced() const;
25 TerminalPrinter& operator<< (const std::string s);
26 protected:
27 void printChar(char c);
28 private:
29 int m_lines;
30 int m_col;
31 int m_screenWidth; // in characters
32 };
33
34 #endif // TERMINALPRINTER_H

  ViewVC Help
Powered by ViewVC