diff options
Diffstat (limited to 'deps/icu-small/source/common/bytesinkutil.h')
-rw-r--r-- | deps/icu-small/source/common/bytesinkutil.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/deps/icu-small/source/common/bytesinkutil.h b/deps/icu-small/source/common/bytesinkutil.h index 8287ffea4ca..69e4cbcd263 100644 --- a/deps/icu-small/source/common/bytesinkutil.h +++ b/deps/icu-small/source/common/bytesinkutil.h @@ -13,6 +13,7 @@ U_NAMESPACE_BEGIN class ByteSink; +class CharString; class Edits; class U_COMMON_API ByteSinkUtil { @@ -58,4 +59,25 @@ private: ByteSink &sink, uint32_t options, Edits *edits); }; +class CharStringByteSink : public ByteSink { +public: + CharStringByteSink(CharString* dest); + ~CharStringByteSink() override; + + CharStringByteSink() = delete; + CharStringByteSink(const CharStringByteSink&) = delete; + CharStringByteSink& operator=(const CharStringByteSink&) = delete; + + void Append(const char* bytes, int32_t n) override; + + char* GetAppendBuffer(int32_t min_capacity, + int32_t desired_capacity_hint, + char* scratch, + int32_t scratch_capacity, + int32_t* result_capacity) override; + +private: + CharString& dest_; +}; + U_NAMESPACE_END |