CARMA C++
ScopedSingleCharIoMode.h
1 #ifndef CARMA_UTIL_SCOPED_SINGLE_CHAR_IO_MODE_H
2 #define CARMA_UTIL_SCOPED_SINGLE_CHAR_IO_MODE_H
3 
4 #include <termio.h>
5 
6 namespace carma {
7 namespace util {
8 
9 
10 class ScopedSingleCharIoMode {
11  public:
12  explicit ScopedSingleCharIoMode( );
13 
14  /* virtual */ ~ScopedSingleCharIoMode( );
15 
16  private:
17  // No copying
18  ScopedSingleCharIoMode( const ScopedSingleCharIoMode & );
19  ScopedSingleCharIoMode & operator=( const ScopedSingleCharIoMode & );
20 
21  struct ::termio oldTermio_;
22 };
23 
24 
25 } // namespace carma::util
26 } // namespace carma
27 
28 #endif