When you use BladeSmith to generate source code for your ActiveX value objects, the following C++ support library files are generated:
These files are used to compile both the client project and the server project; they are automatically included in the appropriate source files.
The C++ support library contains these classes and routines:
There are two types of delimiters you must be aware of when using the DkInStream and DkOutStream classes: string delimiters and field delimiters.
String delimiters are a pair of single-byte characters that indicate the beginning and ending of a string. By default, the string delimiters are the open and close quote characters (" "), but you can specify other characters by using the SetStringDelimiters() method.
Field delimiters indicate the beginning and ending of a field. By default, space characters are always field delimiters. In addition, you can specify a multibyte string to also be a field delimiter, using the SetFieldDelimiters() method.
A string can contain multiple fields and their delimiters. However, a field cannot contain a string.
For example, if the default string and field delimiters are in use and given the characters "Date: 4 28 97", then there is one string, Date: 4 28 97, and four fields: Date:, 4, 28, and 97.
To include a string-delimiter character in a string, precede it with a backslash character (\). For example, to read the string Date: "4 28 97", specify the string as follows: "Date: \"4 28 97\"".
The rest of this section provides reference information for the text parsing classes and memory management routines.
The DkInStream class provides methods that read an input text stream and populate an instance of the object (an opaque type if invoked by server code or an ActiveX value object if invoked by client code). This class has a built-in cursor that tracks how much of the input stream has been read.
All of the read methods return an mi_boolean value: mi_true if the read is successful or mi_false if it is not. In addition, all read methods except ReadChar, ReadGLWChar, and ReadWChar skip field and string delimiters before reading.
The gl_wchar data type is configurable, but it is a 4-byte character by default. For more information on this data type, see the discussion of the IBM Informix GLS API in the IBM Informix: GLS User's Guide.
The DkInStream class provides the following methods.
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. For more information on this data type, see the discussion of the IBM Informix GLS API in the IBM Informix: GLS User's Guide.
The DkOutStream class provides the following methods.
These routines do not form a class. They are provided for server-project use only. It is recommended that you use the new and delete operators. Use malloc and free only if you must; for example, if you call into a C file.