Rudiments
|
#include <output.h>
Inherits object.
Inherited by bytebuffer, filedescriptor, httpresponse, and httpserverapi.
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 bytebuffer, filedescriptor, stringbuffer, ucs2stringbuffer, and wstringbuffer.
void output::printBits | ( | byte_t | value | ) |
Prints "value" to the output as a string of ones and zeros.
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.
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.
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.
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.
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.
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.
Prints a hex/character representation "size" bytes of "data" to the output.
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.
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.
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.
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.
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.
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 bytebuffer, filedescriptor, stringbuffer, ucs2stringbuffer, and wstringbuffer.
|
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 bytebuffer, filedescriptor, stringbuffer, ucs2stringbuffer, and wstringbuffer.
|
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 bytebuffer, filedescriptor, stringbuffer, ucs2stringbuffer, and wstringbuffer.
|
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 bytebuffer, filedescriptor, httpresponse, stringbuffer, and ucs2stringbuffer.
|
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.
Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.
Implemented in bytebuffer, filedescriptor, httpresponse, and stringbuffer.
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.
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 bytebuffer, filedescriptor, httpresponse, stringbuffer, and ucs2stringbuffer.
|
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.
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 bytebuffer, filedescriptor, httpresponse, and stringbuffer.
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.
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 bytebuffer, filedescriptor, httpresponse, and stringbuffer.
|
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.
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 bytebuffer, filedescriptor, httpresponse, and wstringbuffer.
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.
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 bytebuffer, filedescriptor, httpresponse, and wstringbuffer.
|
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.
Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.
Implemented in bytebuffer, filedescriptor, httpresponse, stringbuffer, ucs2stringbuffer, and wstringbuffer.
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.
Writes "number" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.
Implemented in bytebuffer, filedescriptor, httpresponse, stringbuffer, ucs2stringbuffer, and wstringbuffer.
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 bytebuffer, filedescriptor, httpresponse, stringbuffer, ucs2stringbuffer, and wstringbuffer.
|
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 bytebuffer, filedescriptor, httpresponse, stringbuffer, ucs2stringbuffer, and wstringbuffer.
|
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 bytebuffer, filedescriptor, httpresponse, stringbuffer, ucs2stringbuffer, and wstringbuffer.
|
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 bytebuffer, filedescriptor, httpresponse, stringbuffer, ucs2stringbuffer, and wstringbuffer.
|
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 bytebuffer, filedescriptor, httpresponse, stringbuffer, ucs2stringbuffer, and wstringbuffer.
|
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 bytebuffer, filedescriptor, httpresponse, stringbuffer, ucs2stringbuffer, and wstringbuffer.
|
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.
Writes "character" to the file descriptor. Returns the number of bytes that were successfully written or RESULT_ERROR if an error occurred.
Implemented in bytebuffer, filedescriptor, httpresponse, and wstringbuffer.
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.
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 bytebuffer, filedescriptor, httpresponse, and ucs2stringbuffer.
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.
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 bytebuffer, filedescriptor, httpresponse, and ucs2stringbuffer.
|
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 bytebuffer, filedescriptor, httpresponse, and ucs2stringbuffer.
|
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.