The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Data structure of TStringArray


Hint: The following information is for advanced users only. Normally you need not know any details of the internal data structure.

The figure below shows the internal memory organization of the class TStringArray. Note that the identifiers used here are not publicly available, so you won't find these identifiers unless you purchased a source license of the unit DStruct.


Access to the internal buffer is as follows: the row index is used to find the corresponding sorted row via the lookup table FSortIx. Together with the column index a "pointer" is retrieved from FPoiArray which is used to access the actual string in the corresponding buffer. The size of the buffers FStgPool is determined by the constant SABuffSize.

Summary of identifiers:

buffnum Number of buffer where the string is stored.
FFirstFree List of offsets of the first free byte in each buffer.
FNRow Number of rows in string array.
FRAllocated Number of pre-allocated rows.
FColAttrib Buffer for column attributes.
FRowAttrib Buffer for row attributes.
FPoiArray Array of string indices. An individual index contains the buffer number and the byte offset within this buffer.
FSortIx Index for sorting the rows of the string array.
offset Offset within a buffer to address a particular string.
FStgPool Dynamic array of string buffers. The number of allocated string buffers depends on the number and sizes of the stored strings.


Last Update: 2013-Mar-23