24 <p>A string pool is referenced through an <xref href="GUID-4BF6ECD3-5FB3-3A6A-B9CE-98871BD0812B.dita"><apiname>RStringPool</apiname></xref>, |
24 <p>A string pool is referenced through an <xref href="GUID-4BF6ECD3-5FB3-3A6A-B9CE-98871BD0812B.dita"><apiname>RStringPool</apiname></xref>, |
25 which is a handle like object. The following diagram illustrates the basic |
25 which is a handle like object. The following diagram illustrates the basic |
26 idea: </p> |
26 idea: </p> |
27 <fig id="GUID-756DB8BA-1D6F-56AE-9C93-66DD3512B4A7"> |
27 <fig id="GUID-756DB8BA-1D6F-56AE-9C93-66DD3512B4A7"> |
28 <title> String pool representation </title> |
28 <title> String pool representation </title> |
29 <image href="GUID-7F8F6ABB-8F46-5486-A116-6965787BC539_d0e223118_href.png" placement="inline"/> |
29 <image href="GUID-7F8F6ABB-8F46-5486-A116-6965787BC539_d0e219745_href.png" placement="inline"/> |
30 </fig> |
30 </fig> |
31 <p>A string pool is a mechanism for storing strings in a particular way that |
31 <p>A string pool is a mechanism for storing strings in a particular way that |
32 makes the comparison of strings a very fast operation. It is particularly |
32 makes the comparison of strings a very fast operation. It is particularly |
33 efficient at handling strings that can be set up at program compile time. |
33 efficient at handling strings that can be set up at program compile time. |
34 For example, strings that identify lexical elements in a structured text. |
34 For example, strings that identify lexical elements in a structured text. |
79 They are represented by a <xref href="GUID-91322CD6-6DA0-3868-A5D7-CA561A102074.dita"><apiname>TStringTable</apiname></xref> object. A string |
79 They are represented by a <xref href="GUID-91322CD6-6DA0-3868-A5D7-CA561A102074.dita"><apiname>TStringTable</apiname></xref> object. A string |
80 table can be added to the string pool by passing the string table reference |
80 table can be added to the string pool by passing the string table reference |
81 to a call to: </p> <codeblock id="GUID-2FAB371D-74A4-5D7E-99F1-B7C02BEDA8D5" xml:space="preserve">void RStringTable::OpenL( const TStringTable& aTable );</codeblock> <p>The following diagram illustrates a general picture. Note that the strings |
81 to a call to: </p> <codeblock id="GUID-2FAB371D-74A4-5D7E-99F1-B7C02BEDA8D5" xml:space="preserve">void RStringTable::OpenL( const TStringTable& aTable );</codeblock> <p>The following diagram illustrates a general picture. Note that the strings |
82 in any given string table are deemed to be either case sensitive or case insensitive, |
82 in any given string table are deemed to be either case sensitive or case insensitive, |
83 and this governs how comparisons are made. </p> <fig id="GUID-D7CEA86C-0643-5BDA-A60E-D80B97008BF2"> |
83 and this governs how comparisons are made. </p> <fig id="GUID-D7CEA86C-0643-5BDA-A60E-D80B97008BF2"> |
84 <image href="GUID-ECACB935-AD19-5BE6-AC27-A63465244087_d0e223225_href.png" placement="inline"/> |
84 <image href="GUID-ECACB935-AD19-5BE6-AC27-A63465244087_d0e219852_href.png" placement="inline"/> |
85 </fig> <p>As the name implies, a static string table is declared as a <codeph>const |
85 </fig> <p>As the name implies, a static string table is declared as a <codeph>const |
86 TStringTable</codeph> data member of a class with a user-defined |
86 TStringTable</codeph> data member of a class with a user-defined |
87 name. The class name is defined in a header file while the table itself is |
87 name. The class name is defined in a header file while the table itself is |
88 implemented in a <codeph>.cpp</codeph> C++ source file. Both the header file |
88 implemented in a <codeph>.cpp</codeph> C++ source file. Both the header file |
89 and the C++ source file are normally included in the project definition. Typically, |
89 and the C++ source file are normally included in the project definition. Typically, |