The DkOutStream class

The DkOutStream class provides methods that write an object (an opaque type if invoked by server code or an ActiveX value object if invoked by client code) to an output stream. All of the write methods append to the output string; they do not overwrite the existing contents of the string.

The gl_wchar data type is configurable, but it is a 4-byte character by default.

The DkOutStream class provides the following methods.
Method Description
DkOutStream(size_t initial=50, size_t increment=50) Creates an output string of size initial, allocating additional memory in chunks of size increment.
mi_lvarchar* CreateLvarChar() Returns a pointer to a new mi_lvarchar that holds a copy of the output string.
const char* GetBuffer() Returns a pointer to the internal buffer that contains the output string.
void SetStringDelimiters(char begin, char end) Sets string delimiters to two single-byte characters (begin and end). Default values are the open-quote character (“) and the close-quote character ("?).
void WriteBoolean(mi_boolean value) Writes a Boolean value of true or false to the output string.
void WriteChar(mi_char value) Writes a value of mi_char to the output string.
void WriteDate(mi_date value) Writes a date value to the output string.
void WriteDateTime(const mi_datetime& value) Writes a datetime value to the output string.
void WriteDecimal(const mi_decimal& value) Writes a decimal or numeric value to the output string.
void WriteDoublePrecision( mi_double_precision value) Writes a double-precision value to the output string.
void WriteGLWChar(gl_wchar_t value) Writes a value of type gl_wchar (a 4-byte character, by default) to the output string.
void WriteGLWString( const gl_wchar_t* value, size_t length) Writes a string of gl_wchar values, size length, to the output string. This method precedes string-delimiter characters with backslash characters (\).
void WriteInt1(mi_int1 value) Writes a 1-byte integer value to the output string.
void WriteInt8(const mi_int8& value) Writes an 8-byte integer value to the output string.
void WriteInteger(mi_integer value) Writes a 4-byte integer value to the output string.
void WriteInterval(const mi_interval& value) Writes an interval value to the output string.
void WriteLiteral(const char* string) Writes the specified string to the output string. Delimiter characters are written as is; they are not skipped or preceded by backslash characters.

This method is the opposite of DkInStream.Match.

void WriteMoney(const mi_money& value) Writes a money value to the output string.
void WriteReal(mi_real value) Writes a real value to the output string.
void WriteSmallInt(mi_smallint value) Writes a 2-byte integer value to the output string.
void WriteString(const mi_string* value, size_t length) Writes a string of mi_string values, size length, to the output string. This method precedes string-delimiter characters with backslash characters (\).
void WriteUChar1(mi_unsigned_char1 value) Writes a 1-byte unsigned integer to the output string. (Integer is correct; the data type is misnamed.)
void WriteUInt8(const mi_unsigned_int8& value) Writes an 8-byte unsigned integer to the output string.
void WriteUInteger( mi_unsigned_integer value) Writes a 4-byte unsigned integer to the output string.
void WriteUSmallInt( mi_unsigned_smallint value) Writes a 2-byte unsigned integer to the output string.
void WriteWChar(mi_wchar value) Writes a 2-byte character to the output string.
void WriteWString( const mi_wchar* value, size_t length) Writes a string of mi_wchar values, size length, to the output string. This method precedes string-delimiter characters with backslash characters (\).