OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #ifndef SkDmuxWStream_DEFINED | 7 #ifndef SkDmuxWStream_DEFINED |
8 #define SkDmuxWStream_DEFINED | 8 #define SkDmuxWStream_DEFINED |
9 | 9 |
10 #include "SkStream.h" | 10 #include "SkStream.h" |
11 #include "SkTDArray.h" | 11 #include "SkTDArray.h" |
12 | 12 |
13 /** | 13 /** |
14 * A SkWStream Demultiplexer. If initialized with | 14 * A SkWStream Demultiplexer. If initialized with |
15 * SkDmuxWStream dmuxWStream(NULL, 0); | 15 * SkDmuxWStream dmuxWStream(NULL, 0); |
16 * then it becomes a /dev/null. | 16 * then it becomes a /dev/null. |
17 */ | 17 */ |
18 class SkDmuxWStream : public SkWStream { | 18 class SkDmuxWStream : public SkWStream { |
19 public: | 19 public: |
20 SkDmuxWStream(SkWStream* const streamArray[], size_t count); | 20 SkDmuxWStream(SkWStream* const streamArray[], size_t count); |
21 ~SkDmuxWStream(); | 21 ~SkDmuxWStream(); |
22 virtual bool write(const void* buffer, size_t size) SK_OVERRIDE; | 22 virtual bool write(const void* buffer, size_t size) override; |
23 virtual void newline() SK_OVERRIDE; | 23 virtual void newline() override; |
24 virtual void flush() SK_OVERRIDE; | 24 virtual void flush() override; |
25 virtual size_t bytesWritten() const SK_OVERRIDE; | 25 virtual size_t bytesWritten() const override; |
26 | 26 |
27 private: | 27 private: |
28 SkTDArray<SkWStream*> fWStreams; | 28 SkTDArray<SkWStream*> fWStreams; |
29 size_t fBytesWritten; | 29 size_t fBytesWritten; |
30 }; | 30 }; |
31 | 31 |
32 #endif // SkDmuxWStream_DEFINED | 32 #endif // SkDmuxWStream_DEFINED |
OLD | NEW |