Rudiments
Public Member Functions | List of all members
output Class Referenceabstract

Inherits object.

Inherited by bytebuffer, filedescriptor, httpresponse, and httpserverapi.

Public Member Functions

 output ()
 
virtual ~output ()
 
virtual off64_t setPositionRelativeToBeginning (off64_t offset)
 
virtual off64_t setPositionRelativeToCurrent (off64_t offset)
 
virtual off64_t setPositionRelativeToEnd (off64_t offset)
 
virtual off64_t getPosition ()
 
virtual ssize_t write (const byte_t *string, size_t size)=0
 
virtual ssize_t write (const char *string)=0
 
virtual ssize_t write (const char *string, size_t length)=0
 
virtual ssize_t write (char character)=0
 
virtual ssize_t write (const wchar_t *string)=0
 
virtual ssize_t write (const wchar_t *string, size_t length)=0
 
virtual ssize_t write (wchar_t character)=0
 
virtual ssize_t writeUcs2 (const ucs2_t *string)=0
 
virtual ssize_t writeUcs2 (const ucs2_t *string, size_t length)=0
 
virtual ssize_t writeUcs2 (ucs2_t character)=0
 
virtual ssize_t write (int16_t number)=0
 
virtual ssize_t write (int32_t number)=0
 
virtual ssize_t write (int64_t number)=0
 
virtual ssize_t write (byte_t character)=0
 
virtual ssize_t write (uint16_t number)=0
 
virtual ssize_t write (uint32_t number)=0
 
virtual ssize_t write (uint64_t number)=0
 
virtual ssize_t write (float number)=0
 
virtual ssize_t write (double number)=0
 
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 output class provides a base class for things to which output can be directed (file descriptors, files, sockets, string buffers, etc.)

Constructor & Destructor Documentation

◆ output()

output::output ( )

Creates an instance of the output class.

◆ ~output()

virtual output::~output ( )
virtual

Deletes this instance of the output class.

Member Function Documentation

◆ getPosition()

off64_t output::getPosition ( )
inlinevirtual

Returns the position at which the next write will occur or -1 on failure.

This implementation of the method ignores "offset" and always returns -1, however a child class might implement this method to actually set the position.

Reimplemented in wstringbuffer, ucs2stringbuffer, stringbuffer, filedescriptor, and bytebuffer.

◆ printBits() [1/9]

void output::printBits ( byte_t  value)

Prints "value" to the output as a string of ones and zeros.

◆ printBits() [2/9]

void output::printBits ( char  value)

Prints "value" to the output as a string of ones and zeros.

◆ printBits() [3/9]

void output::printBits ( const byte_t *  bits,
uint64_t  size 
)

Prints "value" to the output as a string of ones and zeros.

◆ printBits() [4/9]

void output::printBits ( int16_t  value)

Prints "value" to the output as a string of ones and zeros.

◆ printBits() [5/9]

void output::printBits ( int32_t  value)

Prints "value" to the output as a string of ones and zeros.

◆ printBits() [6/9]

void output::printBits ( int64_t  value)

Prints "value" to the output as a string of ones and zeros.

◆ printBits() [7/9]

void output::printBits ( uint16_t  value)

Prints "value" to the output as a string of ones and zeros.

◆ printBits() [8/9]

void output::printBits ( uint32_t  value)

Prints "value" to the output as a string of ones and zeros.

◆ printBits() [9/9]

void output::printBits ( uint64_t  value)

Prints "value" to the output as a string of ones and zeros.

◆ printf() [1/4]

ssize_t output::printf ( const char *  format,
va_list *  argp 
)
inlinevirtual

Writes "argp" using "format" which should comply with standard printf formatting rules.

Note that argp is a pointer to a va_list, not just a va_list.

Returns the number of bytes written.

NOTE: The various implemententations of this method use whatever underlying v(d/s/f)printf() functions are available, which, as it turns out, yield fairly inconsistent results between each other, especially across platforms, when printing wide characters. Don't be surprised if you get different results, when printf()ing wide strings to a stringbuffer vs. filedescriptor, or to a buffered vs. unbuffered file descriptor.

◆ printf() [2/4]

ssize_t output::printf ( const char *  format,
  ... 
)
inlinevirtual

Writes "..." using "format" which should comply with standard printf formatting rules.

Returns the number of bytes written or -1 if an error occurred.

NOTE: The various implemententations of this method use whatever underlying v(d/s/f)printf() functions are available, which, as it turns out, yield fairly inconsistent results between each other, especially across platforms, when printing wide characters. Don't be surprised if you get different results, when printf()ing wide strings to a stringbuffer vs. filedescriptor, or to a buffered vs. unbuffered file descriptor.

◆ printf() [3/4]

ssize_t output::printf ( const wchar_t *  format,
va_list *  argp 
)
inlinevirtual

Writes "argp" using "format" which should comply with standard wprintf formatting rules.

Note that argp is a pointer to a va_list, not just a va_list.

Returns the number of bytes written.

NOTE: The various implemententations of this method use whatever underlying v(d/s/f)printf() functions are available, which, as it turns out, yield fairly inconsistent results between each other, especially across platforms, when printing wide characters. Don't be surprised if you get different results, when printf()ing wide strings to a stringbuffer vs. filedescriptor, or to a buffered vs. unbuffered file descriptor.

◆ printf() [4/4]

ssize_t output::printf ( const wchar_t *  format,
  ... 
)
inlinevirtual

Writes "..." using "format" which should comply with standard wprintf formatting rules.

Returns the number of bytes written or -1 if an error occurred.

NOTE: The various implemententations of this method use whatever underlying v(d/s/f)printf() functions are available, which, as it turns out, yield fairly inconsistent results between each other, especially across platforms, when printing wide characters. Don't be surprised if you get different results, when printf()ing wide strings to a stringbuffer vs. filedescriptor, or to a buffered vs. unbuffered file descriptor.

◆ printfUcs2() [1/2]

ssize_t output::printfUcs2 ( const ucs2_t *  format,
va_list *  argp 
)
inlinevirtual

Writes "argp" using "format" which should comply with standard wprintf formatting rules.

Note that argp is a pointer to a va_list, not just a va_list.

Returns the number of bytes written.

NOTE: The various implemententations of this method use whatever underlying v(d/s/f)printf() functions are available, which, as it turns out, yield fairly inconsistent results between each other, especially across platforms, when printing wide characters. Don't be surprised if you get different results, when printf()ing wide strings to a stringbuffer vs. filedescriptor, or to a buffered vs. unbuffered file descriptor.

◆ printfUcs2() [2/2]

ssize_t output::printfUcs2 ( const ucs2_t *  format,
  ... 
)
inlinevirtual

Writes "..." using "format" which should comply with standard wprintf formatting rules.

Returns the number of bytes written or -1 if an error occurred.

NOTE: The various implemententations of this method use whatever underlying v(d/s/f)printf() functions are available, which, as it turns out, yield fairly inconsistent results between each other, especially across platforms, when printing wide characters. Don't be surprised if you get different results, when printf()ing wide strings to a stringbuffer vs. filedescriptor, or to a buffered vs. unbuffered file descriptor.

◆ printHex() [1/2]

void output::printHex ( const byte_t *  data,
uint64_t  size 
)

Prints a hex/character representation "size" bytes of "data" to the output.

◆ printHex() [2/2]

void output::printHex ( const byte_t *  data,
uint64_t  size,
uint16_t  indent 
)

Prints a hex/character representation "size" bytes of "data" to the output, indented by "indent" tabs.

◆ safePrint() [1/6]

void output::safePrint ( byte_t  c)

Prints "c" to the output, however if "c" is non-printing character then it is printed as a hex value of the format: (0x0a). Carriage returns, line feeds and tabs are printed as
, \r and \t.

◆ safePrint() [2/6]

void output::safePrint ( char  c)

Prints "c" to the output, however if "c" is non-printing character then it is printed as a hex value of the format: (0x0a). Carriage returns, line feeds and tabs are printed as
, \r and \t.

◆ safePrint() [3/6]

void output::safePrint ( const byte_t *  str)

Prints "str" to the output, however all non-printing characters are printed as hex values of the format: (0x0a) and carriage returns, line feeds and tabs are printed as
, \r and \t.

◆ safePrint() [4/6]

void output::safePrint ( const byte_t *  str,
int32_t  length 
)

Prints "length" characters of "str" to the output, however all non-printing characters are printed as hex values of the format: (0x0a) and carriage returns, line feeds and tabs are printed as
, \r and \t.

◆ safePrint() [5/6]

void output::safePrint ( const char *  str)

Prints "str" to the output, however all non-printing characters are printed as hex values of the format: (0x0a) and carriage returns, line feeds and tabs are printed as
, \r and \t.

◆ safePrint() [6/6]

void output::safePrint ( const char *  str,
int32_t  length 
)

Prints "length" characters of "str" to the output, however all non-printing characters are printed as hex values of the format: (0x0a) and carriage returns, line feeds and tabs are printed as
, \r and \t.

◆ setPositionRelativeToBeginning()

off64_t output::setPositionRelativeToBeginning ( off64_t  offset)
inlinevirtual

Sets the position (relative to the beginning of the file descriptor) at which the next write will occur to "offset". Returns that position on success or -1 on failure.

This implementation of the method ignores "offset" and always returns -1, however a child class might implement this method to actually set the position.

Reimplemented in wstringbuffer, ucs2stringbuffer, stringbuffer, filedescriptor, and bytebuffer.

◆ setPositionRelativeToCurrent()

off64_t output::setPositionRelativeToCurrent ( off64_t  offset)
inlinevirtual

Advances the position at which the next write will occur by "offset" bytes. Returns that position on success or -1 on failure.

This implementation of the method ignores "offset" and always returns -1, however a child class might implement this method to actually set the position.

Reimplemented in wstringbuffer, ucs2stringbuffer, stringbuffer, filedescriptor, and bytebuffer.

◆ setPositionRelativeToEnd()

off64_t output::setPositionRelativeToEnd ( off64_t  offset)
inlinevirtual

Sets the position at which the next write will occur to the end of the file plus "offset" bytes. Generally, "offset" will be negative. Returns the position on success or -1 on failure.

This implementation of the method ignores "offset" and always returns -1, however a child class might implement this method to actually set the position.

Reimplemented in wstringbuffer, ucs2stringbuffer, stringbuffer, filedescriptor, and bytebuffer.

◆ write() [1/32]

virtual ssize_t output::write ( byte_t  character)
pure virtual

Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [2/32]

virtual ssize_t output::write ( byte_t  character,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [3/32]

virtual ssize_t output::write ( char  character)
pure virtual

Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [4/32]

virtual ssize_t output::write ( char  character,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [5/32]

virtual ssize_t output::write ( const byte_t *  string,
size_t  size 
)
pure virtual

Writes "size" bytes of "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [6/32]

virtual ssize_t output::write ( const byte_t *  string,
size_t  size,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "size" bytes of "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [7/32]

virtual ssize_t output::write ( const char *  string)
pure virtual

Writes NULL-terminated "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [8/32]

virtual ssize_t output::write ( const char *  string,
int32_t  sec,
int32_t  usec 
)
virtual

Writes NULL-terminated "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [9/32]

virtual ssize_t output::write ( const char *  string,
size_t  length 
)
pure virtual

Writes "length" characters of "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred. Note that it is possible to write beyond the string's NULL terminator using this method.

Implemented in stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [10/32]

virtual ssize_t output::write ( const char *  string,
size_t  length,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "length" characters of "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred. Note that it is possible to write beyond the string's NULL terminator using this method.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [11/32]

virtual ssize_t output::write ( const wchar_t *  string)
pure virtual

Writes NULL-terminated "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [12/32]

virtual ssize_t output::write ( const wchar_t *  string,
int32_t  sec,
int32_t  usec 
)
virtual

Writes NULL-terminated "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [13/32]

virtual ssize_t output::write ( const wchar_t *  string,
size_t  length 
)
pure virtual

Writes "length" characters of "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred. Note that it is possible to write beyond the string's NULL terminator using this method.

Implemented in wstringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [14/32]

virtual ssize_t output::write ( const wchar_t *  string,
size_t  length,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "length" characters of "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred. Note that it is possible to write beyond the string's NULL terminator using this method.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [15/32]

virtual ssize_t output::write ( double  number)
pure virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [16/32]

virtual ssize_t output::write ( double  number,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [17/32]

virtual ssize_t output::write ( float  number)
pure virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [18/32]

virtual ssize_t output::write ( float  number,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [19/32]

virtual ssize_t output::write ( int16_t  number)
pure virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [20/32]

virtual ssize_t output::write ( int16_t  number,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [21/32]

virtual ssize_t output::write ( int32_t  number)
pure virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [22/32]

virtual ssize_t output::write ( int32_t  number,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [23/32]

virtual ssize_t output::write ( int64_t  number)
pure virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [24/32]

virtual ssize_t output::write ( int64_t  number,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [25/32]

virtual ssize_t output::write ( uint16_t  number)
pure virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [26/32]

virtual ssize_t output::write ( uint16_t  number,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [27/32]

virtual ssize_t output::write ( uint32_t  number)
pure virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [28/32]

virtual ssize_t output::write ( uint32_t  number,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [29/32]

virtual ssize_t output::write ( uint64_t  number)
pure virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, ucs2stringbuffer, stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [30/32]

virtual ssize_t output::write ( uint64_t  number,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ write() [31/32]

virtual ssize_t output::write ( wchar_t  character)
pure virtual

Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in wstringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ write() [32/32]

virtual ssize_t output::write ( wchar_t  character,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ writeUcs2() [1/6]

virtual ssize_t output::writeUcs2 ( const ucs2_t *  string)
pure virtual

Writes NULL-terminated "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in ucs2stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ writeUcs2() [2/6]

virtual ssize_t output::writeUcs2 ( const ucs2_t *  string,
int32_t  sec,
int32_t  usec 
)
virtual

Writes NULL-terminated "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ writeUcs2() [3/6]

virtual ssize_t output::writeUcs2 ( const ucs2_t *  string,
size_t  length 
)
pure virtual

Writes "length" characters of "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred. Note that it is possible to write beyond the string's NULL terminator using this method.

Implemented in ucs2stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ writeUcs2() [4/6]

virtual ssize_t output::writeUcs2 ( const ucs2_t *  string,
size_t  length,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "length" characters of "string" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred. Note that it is possible to write beyond the string's NULL terminator using this method.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.

◆ writeUcs2() [5/6]

virtual ssize_t output::writeUcs2 ( ucs2_t  character)
pure virtual

Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

Implemented in ucs2stringbuffer, httpresponse, filedescriptor, and bytebuffer.

◆ writeUcs2() [6/6]

virtual ssize_t output::writeUcs2 ( ucs2_t  character,
int32_t  sec,
int32_t  usec 
)
virtual

Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.

In this implementation of the method, "sec" and "usec" are ignored, however a child class might implement a timeout using them. In that case, the method would return RESULT_TIMEOUT if a timeout occurred.

Reimplemented in filedescriptor.