Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TStringList Class Reference

A mechanism for accessing strings stored on a stream. More...

#include <resource.h>

Inheritance diagram for TStringList::

TObject TStreamable List of all members.

Public Methods

 ~TStringList ()
void get (char *dest, ushort key)

Static Public Methods

TStreamablebuild ()

Static Public Attributes

const char* const name

Protected Methods

 TStringList (StreamableInit)
virtual void write (opstream &)
virtual void* read (ipstream &is)

Detailed Description

TStringList provides a mechanism for accessing strings stored on a stream. Each string in a string list is identified by a unique number (ushort TStrIndexRec::key) between 0 and 65,535.

String lists take up less memory than normal string literals, since the strings are stored on a stream instead of in memory. Also, string lists permit easy internationalization, as the strings are not hard-coded in your program.

TStringList has member functions only for accessing strings; you must use TStrListMaker to create string lists.

Definition at line 386 of file resource.h.


Constructor & Destructor Documentation

TStringList::~TStringList ( )
 

Deallocates the memory allocated to the string list.

TStringList::TStringList ( StreamableInit ) [protected]
 

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.


Member Function Documentation

TStreamable * TStringList::build ( ) [static]
 

Called to create an object in certain stream-reading situations.

void TStringList::get ( char * dest,
ushort key )
 

Returns in `dest' the string given by `key', or an empty string if there is no string with the given key.

void * TStringList::read ( ipstream & is ) [protected, virtual]
 

Reads from the input stream `is'.

Reimplemented from TStreamable.

void TStringList::write ( opstream & os ) [inline, protected, virtual]
 

Writes to the output stream `os'.

Reimplemented from TStreamable.

Definition at line 416 of file resource.h.


Member Data Documentation

const char *const TStringList::name [static]
 

Undocumented.

Definition at line 425 of file resource.h.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:36 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001