ICU 55.1 55.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
icu::StringByteSink< StringClass > Class Template Reference

Implementation of ByteSink that writes to a "string". More...

`#include <bytestream.h>`

Inheritance diagram for icu::StringByteSink< StringClass >:

## Public Member Functions
| StringByteSink (StringClass *dest)
| Constructs a ByteSink that will append bytes to the dest string.
virtual void | Append (const char *data, int32_t n)
| Append "bytes[0,n-1]" to this.
Public Member Functions inherited from icu::ByteSink
| ByteSink ()
| Default constructor.
virtual | ~ByteSink ()
| Virtual destructor.
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.
virtual void | Flush ()
| Flush internal buffers.

## Detailed Description

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

Implementation of ByteSink that writes to a "string".

The StringClass is usually instantiated with a std::string.

Stable:
  ICU 4.2

Definition at line 231 of file bytestream.h.

## Constructor & Destructor Documentation

template<typename StringClass>

icu::StringByteSink< StringClass >::StringByteSink | ( | StringClass * | dest | ) |
| inline

Constructs a ByteSink that will append bytes to the dest string.

Parameters

  dest | pointer to string object to append to

Stable:
  ICU 4.2

Definition at line 238 of file bytestream.h.

## Member Function Documentation

template<typename StringClass>

virtual void icu::StringByteSink< StringClass >::Append | ( | const char * | data,
|  | int32_t | n
| ) |  |
| inline virtual

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

Parameters

  data | the pointer to the bytes
  n | the number of bytes; must be non-negative

Stable:
  ICU 4.2

Implements icu::ByteSink.

Definition at line 245 of file bytestream.h.

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

- bytestream.h