diff options
Diffstat (limited to 'src/WinConsoleFile.h')
| -rw-r--r-- | src/WinConsoleFile.h | 53 |
1 files changed, 23 insertions, 30 deletions
diff --git a/src/WinConsoleFile.h b/src/WinConsoleFile.h index 072ff01b..19aaaa44 100644 --- a/src/WinConsoleFile.h +++ b/src/WinConsoleFile.h @@ -42,40 +42,33 @@ namespace aria2 { - // This is a wrapper class for WriteConsoleW - class WinConsoleFile: public OutputFile - { - public: - WinConsoleFile(DWORD stdHandle); - virtual ~WinConsoleFile() {} +// This is a wrapper class for WriteConsoleW +class WinConsoleFile : public OutputFile { +public: + WinConsoleFile(DWORD stdHandle); + virtual ~WinConsoleFile() {} - virtual size_t write(const char* str) CXX11_OVERRIDE; - virtual int vprintf(const char* format, va_list va) CXX11_OVERRIDE; - virtual bool supportsColor() CXX11_OVERRIDE; - virtual int flush() CXX11_OVERRIDE - { - return 0; - } + virtual size_t write(const char* str) CXX11_OVERRIDE; + virtual int vprintf(const char* format, va_list va) CXX11_OVERRIDE; + virtual bool supportsColor() CXX11_OVERRIDE; + virtual int flush() CXX11_OVERRIDE { return 0; } - private: - DWORD stdHandle_; - bool bold_; - bool underline_; - bool reverse_; - WORD fg_, deffg_; - WORD bg_, defbg_; +private: + DWORD stdHandle_; + bool bold_; + bool underline_; + bool reverse_; + WORD fg_, deffg_; + WORD bg_, defbg_; - size_t writeColorful(const std::wstring& str); - inline HANDLE handle() const - { - return ::GetStdHandle(stdHandle_); - } + size_t writeColorful(const std::wstring& str); + inline HANDLE handle() const { return ::GetStdHandle(stdHandle_); } - private: - // Don't allow copying - WinConsoleFile(const WinConsoleFile&) = delete; - WinConsoleFile& operator=(const WinConsoleFile&) = delete; - }; +private: + // Don't allow copying + WinConsoleFile(const WinConsoleFile&) = delete; + WinConsoleFile& operator=(const WinConsoleFile&) = delete; +}; } // namespace aria2 |
