Movatterモバイル変換


[0]ホーム

URL:


ICU 78.1  78.1
Public Member Functions
icu::StringByteSink< StringClass > Class Template Reference

Implementation ofByteSink that writes to a "string".More...

#include <bytestream.h>

Inheritance diagram for icu::StringByteSink< StringClass >:

Public Member Functions

 StringByteSink (StringClass *dest)
 Constructs aByteSink that will append bytes to the dest string.More...
 
 StringByteSink (StringClass *dest, int32_t initialAppendCapacity)
 Constructs aByteSink that reserves append capacity and will append bytes to the dest string.More...
 
virtual void Append (const char *data, int32_t n) override
 Append "bytes[0,n-1]" to this.More...
 
- Public Member Functions inherited fromicu::ByteSink
 ByteSink ()
 Default constructor.More...
 
virtual ~ByteSink ()
 Virtual destructor.More...
 
void AppendU8 (const char *bytes, int32_t n)
 Appends n bytes to this.More...
 
void AppendU8 (const char8_t *bytes, int32_t n)
 Appends n bytes to this.More...
 
virtual char * GetAppendBuffer (int32_t min_capacity, int32_t desired_capacity_hint, char *scratch, int32_t scratch_capacity, int32_t *result_capacity)
 Returns a writable buffer for appending and writes the buffer's capacity to *result_capacity.More...
 
virtual void Flush ()
 Flush internal buffers.More...
 

Detailed Description

template<typename StringClass>
class icu::StringByteSink< StringClass >

Implementation ofByteSink that writes to a "string".

The StringClass is usually instantiated with a std::string or a std::u8string. StringClass must have public member functions reserve(integer type), capacity(), length(), and append(value type, integer type) with the same semantics as those of std::basic_string, and must have an 8-bit value type. If the value type is not char, it must be a public member type StringClass::value_type.

Stable:
ICU 4.2

Definition at line291 of filebytestream.h.

Constructor & Destructor Documentation

◆ StringByteSink()[1/2]

template<typename StringClass >
icu::StringByteSink< StringClass >::StringByteSink(StringClass * dest)
inline

Constructs aByteSink that will append bytes to the dest string.

Parameters
destpointer to string object to append to
Stable:
ICU 4.2

Definition at line299 of filebytestream.h.

◆ StringByteSink()[2/2]

template<typename StringClass >
icu::StringByteSink< StringClass >::StringByteSink(StringClass * dest,
int32_t initialAppendCapacity 
)
inline

Constructs aByteSink that reserves append capacity and will append bytes to the dest string.

Parameters
destpointer to string object to append to
initialAppendCapacitycapacity beyond dest->length() to be reserve()d
Stable:
ICU 60

Definition at line307 of filebytestream.h.

Member Function Documentation

◆ Append()

template<typename StringClass >
virtual voidicu::StringByteSink< StringClass >::Append(const char * data,
int32_t n 
)
inlineoverridevirtual

Append "bytes[0,n-1]" to this.

Parameters
datathe pointer to the bytes
nthe number of bytes; must be non-negative
Stable:
ICU 4.2

Implementsicu::ByteSink.

Definition at line319 of filebytestream.h.


The documentation for this class was generated from the following file:

Generated by doxygen 1.9.1
[8]ページ先頭

©2009-2025 Movatter.jp