6 #ifndef TURI_RESIZING_COUNTING_SINK 7 #define TURI_RESIZING_COUNTING_SINK 9 #include <core/util/charstream.hpp> 13 typedef charstream_impl::resizing_array_sink<false> resizing_array_sink;
20 resizing_array_sink* ras;
24 typedef resizing_array_sink::char_type char_type;
25 typedef resizing_array_sink::category category;
32 inline size_t size()
const {
return ras->size(); }
33 inline char* c_str() {
return ras->c_str(); }
35 inline void clear() { ras->clear(); }
38 return ras->optimal_buffer_size();
41 inline void relinquish() { ras->relinquish(); }
43 inline void advance(std::streamsize n) { ras->advance(n); }
46 inline std::streamsize write(
const char* s, std::streamsize n) {
47 return ras->write(s, n);
std::streamsize optimal_buffer_size() const