@@ -62,8 +62,7 @@ namespace io {
62
62
// The latter will introduce an extra layer of buffering, harming performance.
63
63
// Also, it's conceivable that FileInputStream could someday be enhanced
64
64
// to use zero-copy file descriptors on OSs which support them.
65
- class PROTOBUF_EXPORT FileInputStream PROTOBUF_FUTURE_FINAL
66
- : public ZeroCopyInputStream {
65
+ class PROTOBUF_EXPORT FileInputStream final : public ZeroCopyInputStream {
67
66
public:
68
67
// Creates a stream that reads from the given Unix file descriptor.
69
68
// If a block_size is given, it specifies the number of bytes that
@@ -98,7 +97,7 @@ class PROTOBUF_EXPORT FileInputStream PROTOBUF_FUTURE_FINAL
98
97
int64_t ByteCount () const override ;
99
98
100
99
private:
101
- class PROTOBUF_EXPORT CopyingFileInputStream PROTOBUF_FUTURE_FINAL
100
+ class PROTOBUF_EXPORT CopyingFileInputStream final
102
101
: public CopyingInputStream {
103
102
public:
104
103
CopyingFileInputStream (int file_descriptor);
@@ -141,7 +140,7 @@ class PROTOBUF_EXPORT FileInputStream PROTOBUF_FUTURE_FINAL
141
140
// harming performance. Also, it's conceivable that FileOutputStream could
142
141
// someday be enhanced to use zero-copy file descriptors on OSs which
143
142
// support them.
144
- class PROTOBUF_EXPORT FileOutputStream PROTOBUF_FUTURE_FINAL
143
+ class PROTOBUF_EXPORT FileOutputStream final
145
144
: public CopyingOutputStreamAdaptor {
146
145
public:
147
146
// Creates a stream that writes to the given Unix file descriptor.
@@ -173,7 +172,7 @@ class PROTOBUF_EXPORT FileOutputStream PROTOBUF_FUTURE_FINAL
173
172
int GetErrno () const { return copying_output_.GetErrno (); }
174
173
175
174
private:
176
- class PROTOBUF_EXPORT CopyingFileOutputStream PROTOBUF_FUTURE_FINAL
175
+ class PROTOBUF_EXPORT CopyingFileOutputStream final
177
176
: public CopyingOutputStream {
178
177
public:
179
178
CopyingFileOutputStream (int file_descriptor);
@@ -207,8 +206,7 @@ class PROTOBUF_EXPORT FileOutputStream PROTOBUF_FUTURE_FINAL
207
206
//
208
207
// Note that for reading files (or anything represented by a file descriptor),
209
208
// FileInputStream is more efficient.
210
- class PROTOBUF_EXPORT IstreamInputStream PROTOBUF_FUTURE_FINAL
211
- : public ZeroCopyInputStream {
209
+ class PROTOBUF_EXPORT IstreamInputStream final : public ZeroCopyInputStream {
212
210
public:
213
211
// Creates a stream that reads from the given C++ istream.
214
212
// If a block_size is given, it specifies the number of bytes that
@@ -225,7 +223,7 @@ class PROTOBUF_EXPORT IstreamInputStream PROTOBUF_FUTURE_FINAL
225
223
int64_t ByteCount () const override ;
226
224
227
225
private:
228
- class PROTOBUF_EXPORT CopyingIstreamInputStream PROTOBUF_FUTURE_FINAL
226
+ class PROTOBUF_EXPORT CopyingIstreamInputStream final
229
227
: public CopyingInputStream {
230
228
public:
231
229
CopyingIstreamInputStream (std::istream* input);
@@ -253,8 +251,7 @@ class PROTOBUF_EXPORT IstreamInputStream PROTOBUF_FUTURE_FINAL
253
251
//
254
252
// Note that for writing files (or anything represented by a file descriptor),
255
253
// FileOutputStream is more efficient.
256
- class PROTOBUF_EXPORT OstreamOutputStream PROTOBUF_FUTURE_FINAL
257
- : public ZeroCopyOutputStream {
254
+ class PROTOBUF_EXPORT OstreamOutputStream final : public ZeroCopyOutputStream {
258
255
public:
259
256
// Creates a stream that writes to the given C++ ostream.
260
257
// If a block_size is given, it specifies the size of the buffers
@@ -271,7 +268,7 @@ class PROTOBUF_EXPORT OstreamOutputStream PROTOBUF_FUTURE_FINAL
271
268
int64_t ByteCount () const override ;
272
269
273
270
private:
274
- class PROTOBUF_EXPORT CopyingOstreamOutputStream PROTOBUF_FUTURE_FINAL
271
+ class PROTOBUF_EXPORT CopyingOstreamOutputStream final
275
272
: public CopyingOutputStream {
276
273
public:
277
274
CopyingOstreamOutputStream (std::ostream* output);
@@ -301,7 +298,7 @@ class PROTOBUF_EXPORT OstreamOutputStream PROTOBUF_FUTURE_FINAL
301
298
// ConcatenatingInputStream may do odd things. It is suggested that you do
302
299
// not use ConcatenatingInputStream on streams that might produce read errors
303
300
// other than end-of-stream.
304
- class PROTOBUF_EXPORT ConcatenatingInputStream PROTOBUF_FUTURE_FINAL
301
+ class PROTOBUF_EXPORT ConcatenatingInputStream final
305
302
: public ZeroCopyInputStream {
306
303
public:
307
304
// All streams passed in as well as the array itself must remain valid
0 commit comments