Rudiments
|
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 () |
The output class provides a base class for things to which output can be directed (file descriptors, files, sockets, string buffers, etc.)
output::output | ( | ) |
Creates an instance of the output class.
|
virtual |
Deletes this instance of the output class.
|
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.
void output::printBits | ( | byte_t | value | ) |
Prints "value" to the output as a string of ones and zeros.
void output::printBits | ( | char | value | ) |
Prints "value" to the output as a string of ones and zeros.
void output::printBits | ( | const byte_t * | bits, |
uint64_t | size | ||
) |
Prints "value" to the output as a string of ones and zeros.
void output::printBits | ( | int16_t | value | ) |
Prints "value" to the output as a string of ones and zeros.
void output::printBits | ( | int32_t | value | ) |
Prints "value" to the output as a string of ones and zeros.
void output::printBits | ( | int64_t | value | ) |
Prints "value" to the output as a string of ones and zeros.
void output::printBits | ( | uint16_t | value | ) |
Prints "value" to the output as a string of ones and zeros.
void output::printBits | ( | uint32_t | value | ) |
Prints "value" to the output as a string of ones and zeros.
void output::printBits | ( | uint64_t | value | ) |
Prints "value" to the output as a string of ones and zeros.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
void output::printHex | ( | const byte_t * | data, |
uint64_t | size | ||
) |
Prints a hex/character representation "size" bytes of "data" to the output.
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.
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.
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.
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.
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.
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.
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.