summaryrefslogtreecommitdiff
path: root/src/WinConsoleFile.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-03-26 17:12:52 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-03-26 17:20:27 +0900
commitd64089632e82a2548752c7a6baaa68365a795a74 (patch)
tree57fc7b85a8c1290975d58fa4761b04a7695bf7e3 /src/WinConsoleFile.h
parentc81b1321122e8509b55c94c0cbca0d8d6d319f0c (diff)
parenta7cd943a06b1a5ff4515b57060b84037f8d01f9f (diff)
Merge branch 'master' into random-webseeding
Diffstat (limited to 'src/WinConsoleFile.h')
-rw-r--r--src/WinConsoleFile.h53
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