X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/0f5d89e82340278ed3d7d50029f37cab2c41a57e..1a147d096ae81f4c8262f7bfc56bd19fc2dee932:/icuSources/common/bytesinkutil.h diff --git a/icuSources/common/bytesinkutil.h b/icuSources/common/bytesinkutil.h index 8287ffea..69e4cbcd 100644 --- a/icuSources/common/bytesinkutil.h +++ b/icuSources/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