Rudiments
Public Member Functions | List of all members
ucs2stringbuffer Class Reference

#include <ucs2stringbuffer.h>

Inherits bytebuffer.

Public Member Functions

 ucs2stringbuffer ()
 
 ucs2stringbuffer (size_t initialsize)
 
 ucs2stringbuffer (ucs2_t *initialcontents, size_t initialsize)
 
 ucs2stringbuffer (ucs2stringbuffer &s)
 
ucs2stringbufferoperator= (ucs2stringbuffer &s)
 
 ~ucs2stringbuffer ()
 
off64_t setPositionRelativeToBeginning (off64_t pos)
 
off64_t setPositionRelativeToCurrent (off64_t pos)
 
off64_t setPositionRelativeToEnd (off64_t pos)
 
off64_t getPosition ()
 
ssize_t write (const byte_t *string)
 
ssize_t write (const byte_t *string, size_t size)
 
ssize_t writeUcs2 (const ucs2_t *string)
 
ssize_t writeUcs2 (const ucs2_t *string, size_t length)
 
ssize_t writeUcs2 (ucs2_t character)
 
ssize_t write (int16_t number)
 
ssize_t write (int32_t number)
 
ssize_t write (int64_t number)
 
ssize_t write (byte_t character)
 
ssize_t write (uint16_t number)
 
ssize_t write (uint32_t number)
 
ssize_t write (uint64_t number)
 
ssize_t write (float number)
 
ssize_t write (float number, uint16_t scale)
 
ssize_t write (float number, uint16_t precision, uint16_t scale)
 
ssize_t write (double number)
 
ssize_t write (double number, uint16_t scale)
 
ssize_t write (double number, uint16_t precision, uint16_t scale)
 
ucs2stringbufferappend (const byte_t *string)
 
ucs2stringbufferappend (const byte_t *string, size_t size)
 
ucs2stringbufferappendUcs2 (const ucs2_t *string)
 
ucs2stringbufferappendUcs2 (const ucs2_t *string, size_t length)
 
ucs2stringbufferappendUcs2 (ucs2_t character)
 
ucs2stringbufferappend (int16_t number)
 
ucs2stringbufferappend (int32_t number)
 
ucs2stringbufferappend (int64_t number)
 
ucs2stringbufferappend (byte_t character)
 
ucs2stringbufferappend (uint16_t number)
 
ucs2stringbufferappend (uint32_t number)
 
ucs2stringbufferappend (uint64_t number)
 
ucs2stringbufferappend (int16_t number, uint16_t zeropadding)
 
ucs2stringbufferappend (int32_t number, uint16_t zeropadding)
 
ucs2stringbufferappend (int64_t number, uint16_t zeropadding)
 
ucs2stringbufferappend (uint16_t number, uint16_t zeropadding)
 
ucs2stringbufferappend (uint32_t number, uint16_t zeropadding)
 
ucs2stringbufferappend (uint64_t number, uint16_t zeropadding)
 
ucs2stringbufferappend (float number)
 
ucs2stringbufferappend (float number, uint16_t scale)
 
ucs2stringbufferappend (float number, uint16_t precision, uint16_t scale)
 
ucs2stringbufferappend (double number)
 
ucs2stringbufferappend (double number, uint16_t scale)
 
ucs2stringbufferappend (double number, uint16_t precision, uint16_t scale)
 
void truncate (size_t pos)
 
void truncate ()
 
bool clear ()
 
bool clear (size_t initialsize)
 
bool clear (ucs2_t *initialcontents, size_t initialsize)
 
const ucs2_t * getString ()
 
ucs2_t * detachString ()
 
size_t getStringLength ()
 
- Public Member Functions inherited from bytebuffer
 bytebuffer ()
 
 bytebuffer (size_t initialsize)
 
 bytebuffer (byte_t *initialcontents, size_t initialsize)
 
 bytebuffer (bytebuffer &v)
 
bytebufferoperator= (bytebuffer &v)
 
virtual ~bytebuffer ()
 
ssize_t write (const char *string, size_t length)
 
ssize_t write (const char *string)
 
ssize_t write (const wchar_t *string, size_t length)
 
ssize_t write (const wchar_t *string)
 
ssize_t write (char character)
 
ssize_t write (wchar_t character)
 
bytebufferappend (const byte_t *data, size_t size)
 
bytebufferappend (const char *string, size_t length)
 
bytebufferappend (const char *string)
 
bytebufferappend (const wchar_t *string, size_t length)
 
bytebufferappend (const wchar_t *string)
 
bytebufferappendUcs2 (const ucs2_t *string, size_t length)
 
bytebufferappendUcs2 (const ucs2_t *string)
 
bytebufferappend (char character)
 
bytebufferappend (wchar_t character)
 
bytebufferappendUcs2 (ucs2_t character)
 
bytebufferappend (int16_t number)
 
bytebufferappend (int32_t number)
 
bytebufferappend (int64_t number)
 
bytebufferappend (byte_t character)
 
bytebufferappend (uint16_t number)
 
bytebufferappend (uint32_t number)
 
bytebufferappend (uint64_t number)
 
bytebufferappend (float number)
 
bytebufferappend (double number)
 
ssize_t read (byte_t *data, size_t size)
 
bool clear ()
 
bool clear (size_t initialsize)
 
bool clear (byte_t *initialcontents, size_t initialsize)
 
const byte_t * getBuffer ()
 
size_t getSize ()
 
size_t getActualSize ()
 
size_t getInitialSize ()
 
byte_t * detachBuffer ()
 
- Public Member Functions inherited from output
 output ()
 
virtual ~output ()
 
virtual ssize_t write (const byte_t *string, size_t size, int32_t sec, int32_t usec)
 
virtual ssize_t write (const char *string, int32_t sec, int32_t usec)
 
virtual ssize_t write (const char *string, size_t length, int32_t sec, int32_t usec)
 
virtual ssize_t write (char character, int32_t sec, int32_t usec)
 
virtual ssize_t write (const wchar_t *string, int32_t sec, int32_t usec)
 
virtual ssize_t write (const wchar_t *string, size_t length, int32_t sec, int32_t usec)
 
virtual ssize_t write (wchar_t character, int32_t sec, int32_t usec)
 
virtual ssize_t writeUcs2 (const ucs2_t *string, int32_t sec, int32_t usec)
 
virtual ssize_t writeUcs2 (const ucs2_t *string, size_t length, int32_t sec, int32_t usec)
 
virtual ssize_t writeUcs2 (ucs2_t character, int32_t sec, int32_t usec)
 
virtual ssize_t write (int16_t number, int32_t sec, int32_t usec)
 
virtual ssize_t write (int32_t number, int32_t sec, int32_t usec)
 
virtual ssize_t write (int64_t number, int32_t sec, int32_t usec)
 
virtual ssize_t write (byte_t character, int32_t sec, int32_t usec)
 
virtual ssize_t write (uint16_t number, int32_t sec, int32_t usec)
 
virtual ssize_t write (uint32_t number, int32_t sec, int32_t usec)
 
virtual ssize_t write (uint64_t number, int32_t sec, int32_t usec)
 
virtual ssize_t write (float number, int32_t sec, int32_t usec)
 
virtual ssize_t write (double number, int32_t sec, int32_t usec)
 
virtual ssize_t printf (const char *format,...)
 
virtual ssize_t printf (const char *format, va_list *argp)
 
virtual ssize_t printf (const wchar_t *format,...)
 
virtual ssize_t printf (const wchar_t *format, va_list *argp)
 
virtual ssize_t printfUcs2 (const ucs2_t *format,...)
 
virtual ssize_t printfUcs2 (const ucs2_t *format, va_list *argp)
 
void safePrint (byte_t c)
 
void safePrint (const byte_t *str)
 
void safePrint (const byte_t *str, int32_t length)
 
void safePrint (char c)
 
void safePrint (const char *str)
 
void safePrint (const char *str, int32_t length)
 
void printBits (byte_t value)
 
void printBits (uint16_t value)
 
void printBits (uint32_t value)
 
void printBits (uint64_t value)
 
void printBits (char value)
 
void printBits (int16_t value)
 
void printBits (int32_t value)
 
void printBits (int64_t value)
 
void printBits (const byte_t *bits, uint64_t size)
 
void printHex (const byte_t *data, uint64_t size)
 
void printHex (const byte_t *data, uint64_t size, uint16_t indent)
 
- Public Member Functions inherited from object
virtual ~object ()
 

Detailed Description

The ucs2stringbuffer class can be used to store strings of arbitrary length.

It is generally more efficient to reuse the same ucs2stringbuffer over and over than to allocate a new one for each operation.

Constructor & Destructor Documentation

◆ ucs2stringbuffer() [1/4]

ucs2stringbuffer::ucs2stringbuffer ( )
inline

Creates an instance of the ucs2stringbuffer class with default initial size.

◆ ucs2stringbuffer() [2/4]

ucs2stringbuffer::ucs2stringbuffer ( size_t initialsize)
inline

Creates an instance of the ucs2stringbuffer class with the specified "initialsize".

◆ ucs2stringbuffer() [3/4]

ucs2stringbuffer::ucs2stringbuffer ( ucs2_t * initialcontents,
size_t initialsize )
inline

Creates an instance of the ucs2stringbuffer class. The buffer "initialcontents" will be attached to the instance and used as the initial contents. This buffer should not be freed by the calling program. The initial size may be specified by the "initialsize" parameter.

◆ ucs2stringbuffer() [4/4]

ucs2stringbuffer::ucs2stringbuffer ( ucs2stringbuffer & s)
inline

Creates an instance of the ucs2stringbuffer class that is a copy of "s".

◆ ~ucs2stringbuffer()

ucs2stringbuffer::~ucs2stringbuffer ( )
inline

Deletes this instance of the ucs2stringbuffer class.

Member Function Documentation

◆ append() [1/21]

ucs2stringbuffer * ucs2stringbuffer::append ( byte_t character)
inline

Appends "character" to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [2/21]

ucs2stringbuffer * ucs2stringbuffer::append ( const byte_t * string)
inline

Appends "string" to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [3/21]

ucs2stringbuffer * ucs2stringbuffer::append ( const byte_t * string,
size_t size )
inline

Appends the first "size" bytes of "string" to the ucs2stringbuffer, growing the internall buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [4/21]

ucs2stringbuffer * ucs2stringbuffer::append ( double number)
inline

Converts "number" to a string (using a default scale of 4) and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [5/21]

ucs2stringbuffer * ucs2stringbuffer::append ( double number,
uint16_t precision,
uint16_t scale )
inline

Converts "number" to a string using the specified "precision" and "scale" and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [6/21]

ucs2stringbuffer * ucs2stringbuffer::append ( double number,
uint16_t scale )
inline

Converts "number" to a string using the specified "scale" and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [7/21]

ucs2stringbuffer * ucs2stringbuffer::append ( float number)
inline

Converts "number" to a string (using a default scale of 4) and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [8/21]

ucs2stringbuffer * ucs2stringbuffer::append ( float number,
uint16_t precision,
uint16_t scale )
inline

Converts "number" to a string using the specified "precision" and "scale" and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [9/21]

ucs2stringbuffer * ucs2stringbuffer::append ( float number,
uint16_t scale )
inline

Converts "number" to a string using the specified "scale" and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [10/21]

ucs2stringbuffer * ucs2stringbuffer::append ( int16_t number)
inline

Converts "number" to a string and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [11/21]

ucs2stringbuffer * ucs2stringbuffer::append ( int16_t number,
uint16_t zeropadding )
inline

Converts "number" to a string with the specified amount of zeropadding and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [12/21]

ucs2stringbuffer * ucs2stringbuffer::append ( int32_t number)
inline

Converts "number" to a string and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [13/21]

ucs2stringbuffer * ucs2stringbuffer::append ( int32_t number,
uint16_t zeropadding )
inline

Converts "number" to a string with the specified amount of zeropadding and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [14/21]

ucs2stringbuffer * ucs2stringbuffer::append ( int64_t number)
inline

Converts "number" to a string and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [15/21]

ucs2stringbuffer * ucs2stringbuffer::append ( int64_t number,
uint16_t zeropadding )
inline

Converts "number" to a string with the specified amount of zeropadding and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [16/21]

ucs2stringbuffer * ucs2stringbuffer::append ( uint16_t number)
inline

Converts "number" to a string and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [17/21]

ucs2stringbuffer * ucs2stringbuffer::append ( uint16_t number,
uint16_t zeropadding )
inline

Converts "number" to a string with the specified amount of zeropadding and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [18/21]

ucs2stringbuffer * ucs2stringbuffer::append ( uint32_t number)
inline

Converts "number" to a string and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [19/21]

ucs2stringbuffer * ucs2stringbuffer::append ( uint32_t number,
uint16_t zeropadding )
inline

Converts "number" to a string with the specified amount of zeropadding and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [20/21]

ucs2stringbuffer * ucs2stringbuffer::append ( uint64_t number)
inline

Converts "number" to a string and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ append() [21/21]

ucs2stringbuffer * ucs2stringbuffer::append ( uint64_t number,
uint16_t zeropadding )
inline

Converts "number" to a string with the specified amount of zeropadding and appends it to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ appendUcs2() [1/3]

ucs2stringbuffer * ucs2stringbuffer::appendUcs2 ( const ucs2_t * string)
inline

Appends "string" to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ appendUcs2() [2/3]

ucs2stringbuffer * ucs2stringbuffer::appendUcs2 ( const ucs2_t * string,
size_t length )
inline

Appends the first "length" characters of "string" to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ appendUcs2() [3/3]

ucs2stringbuffer * ucs2stringbuffer::appendUcs2 ( ucs2_t character)
inline

Appends "character" to the ucs2stringbuffer, growing the internal buffer as necessary to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->append("numbers: ")->append(5)->append(5.5);

◆ clear() [1/3]

bool ucs2stringbuffer::clear ( )
inline

Empties the ucs2stringbuffer.

Always returns true.

◆ clear() [2/3]

bool ucs2stringbuffer::clear ( size_t initialsize)
inline

Empties the bytebuffer and resets the specified "initialsize" parameter.

Always returns true.

◆ clear() [3/3]

bool ucs2stringbuffer::clear ( ucs2_t * initialcontents,
size_t initialsize )
inline

Empties the bytebuffer and attaches the buffer "initialcontents" to the instance as the initial contents. This buffer should not be freed by the calling program. Also resets the specified "initialsize" parameter.

Always returns true.

◆ detachString()

ucs2_t * ucs2stringbuffer::detachString ( )
inline

Returns a pointer to the string currently stored in the ucs2stringbuffer, then resets the ucs2stringbuffer such that it will no longer use that string.

The calling program must deallocate the string returned from this method.

◆ getPosition()

off64_t ucs2stringbuffer::getPosition ( )
inlinevirtual

Returns the position in the internal buffer at which the next write will occur.

Reimplemented from bytebuffer.

◆ getString()

const ucs2_t * ucs2stringbuffer::getString ( )
inline

Returns the string currently stored in the ucs2stringbuffer.

◆ getStringLength()

size_t ucs2stringbuffer::getStringLength ( )
inline

Returns the length of the string currently stored in the ucs2stringbuffer.

◆ operator=()

ucs2stringbuffer & ucs2stringbuffer::operator= ( ucs2stringbuffer & s)
inline

Makes this instance of the ucs2stringbuffer class identical to "s".

◆ setPositionRelativeToBeginning()

off64_t ucs2stringbuffer::setPositionRelativeToBeginning ( off64_t pos)
inlinevirtual

Sets the position (relative to the beginning of the buffer) at which the next read or write will occur to "offset". If the position is set beyond the end of the buffer, the buffer will grow but the data between the current end of the buffer and the new position will be undefined.

Reimplemented from bytebuffer.

◆ setPositionRelativeToCurrent()

off64_t ucs2stringbuffer::setPositionRelativeToCurrent ( off64_t pos)
inlinevirtual

Advances the position at which the next read or write will occur by "offset" bytes. If the position is set beyond the end of the buffer, the buffer will grow but the data between the current end of the buffer and the new position will be undefined.

Reimplemented from bytebuffer.

◆ setPositionRelativeToEnd()

off64_t ucs2stringbuffer::setPositionRelativeToEnd ( off64_t pos)
inlinevirtual

Sets the position at which the next read or write will occur to the end of the buffer plus "offset" bytes. Generally, offset will be negative. If it is positive then the buffer will grow, but the data between the current buffer will grow but the data between the current end of the buffer and the new position will be undefined.

Reimplemented from bytebuffer.

◆ truncate() [1/2]

void ucs2stringbuffer::truncate ( )
inlinevirtual

Trucnates the ucs2stringbuffer at the current position.

Reimplemented from bytebuffer.

◆ truncate() [2/2]

void ucs2stringbuffer::truncate ( size_t pos)
inlinevirtual

Trucnates the ucs2stringbuffer at position "pos".

Reimplemented from bytebuffer.

◆ write() [1/15]

ssize_t ucs2stringbuffer::write ( byte_t character)
inlinevirtual

Writes "character" to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ write() [2/15]

ssize_t ucs2stringbuffer::write ( const byte_t * string)
inline

Writes "string" to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

◆ write() [3/15]

ssize_t ucs2stringbuffer::write ( const byte_t * string,
size_t size )
inlinevirtual

Writes the first "size" bytes of "string" to the stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ write() [4/15]

ssize_t ucs2stringbuffer::write ( double number)
inlinevirtual

Converts "number" to a string (using a default scale of 4) and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ write() [5/15]

ssize_t ucs2stringbuffer::write ( double number,
uint16_t precision,
uint16_t scale )
inline

Converts "number" to a string using the specified "precision" and "scale" and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

◆ write() [6/15]

ssize_t ucs2stringbuffer::write ( double number,
uint16_t scale )
inline

Converts "number" to a string using the specified "scale" and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

◆ write() [7/15]

ssize_t ucs2stringbuffer::write ( float number)
inlinevirtual

Converts "number" to a string (using a default scale of 4) and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ write() [8/15]

ssize_t ucs2stringbuffer::write ( float number,
uint16_t precision,
uint16_t scale )
inline

Converts "number" to a string using the specified "precision" and "scale" and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

◆ write() [9/15]

ssize_t ucs2stringbuffer::write ( float number,
uint16_t scale )
inline

Converts "number" to a string using the specified "scale" and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

◆ write() [10/15]

ssize_t ucs2stringbuffer::write ( int16_t number)
inlinevirtual

Converts "number" to a string and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ write() [11/15]

ssize_t ucs2stringbuffer::write ( int32_t number)
inlinevirtual

Converts "number" to a string and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ write() [12/15]

ssize_t ucs2stringbuffer::write ( int64_t number)
inlinevirtual

Converts "number" to a string and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the inernal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ write() [13/15]

ssize_t ucs2stringbuffer::write ( uint16_t number)
inlinevirtual

Converts "number" to a string and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ write() [14/15]

ssize_t ucs2stringbuffer::write ( uint32_t number)
inlinevirtual

Converts "number" to a string and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ write() [15/15]

ssize_t ucs2stringbuffer::write ( uint64_t number)
inlinevirtual

Converts "number" to a string and writes it to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ writeUcs2() [1/3]

ssize_t ucs2stringbuffer::writeUcs2 ( const ucs2_t * string)
inlinevirtual

Writes "string" to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ writeUcs2() [2/3]

ssize_t ucs2stringbuffer::writeUcs2 ( const ucs2_t * string,
size_t length )
inlinevirtual

Writes the first "length" characters of "string" to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.

◆ writeUcs2() [3/3]

ssize_t ucs2stringbuffer::writeUcs2 ( ucs2_t character)
inlinevirtual

Writes "character" to the ucs2stringbuffer at the current position and increments the current position to the next byte after the data that was written. If necessary, the internal buffer will grow to accommodate the new data.

Returns a pointer to "this" to enable chaining such as: sb->write("numbers: ")->write(5)->write(5.5);

Reimplemented from bytebuffer.