#include <resource.h>
Inheritance diagram for TStrListMaker::
Public Methods | |
TStrListMaker (ushort aStrSize, ushort aIndexSize) | |
~TStrListMaker () | |
void | put (ushort key, char *str) |
Static Public Methods | |
TStreamable* | build () |
Protected Methods | |
TStrListMaker (StreamableInit) | |
virtual void | write (opstream &os) |
virtual void* | read (ipstream &) |
Definition at line 465 of file resource.h.
|
Creates an in-memory string list of size `aStrSize' with an index of `aIndexSize' elements. A string buffer and an index buffer of the specified size are allocated on the heap. `aStrSize' must be large enough to hold all strings to be added to the string list; each string occupies its length plus a final 0. As strings are added to the string list (using put()), a string index is built. Strings with contiguous keys (such `as' and `sError' in the example above) are recorded in one index record, up to 16 at a time. `aIndexSize' must be large enough to allow for all index records generated as strings are added. Each index entry occupies 6 bytes. |
|
Frees the memory allocated to the string list maker. |
|
Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized virtual table pointers. This is achieved by calling this constructor with an argument of type StreamableInit. |
|
Called to create an object in certain stream-reading situations. |
|
Adds the given string `str' to the calling string list (with the given numerical key). |
|
This pure virtual function must be overridden (or redeclared as pure virtual) in every derived class. The overriding read() function for each streamable class must read the necessary data members from the ipstream object `is'. read() is usually implemented by calling the base class's read() (if any), then extracting any additional data members for the derived class. Reimplemented from TStreamable. Definition at line 517 of file resource.h. |
|
Writes to the output stream `os'. Reimplemented from TStreamable. |