equal
deleted
inserted
replaced
20 TSglQueLink iSlink; |
20 TSglQueLink iSlink; |
21 ... |
21 ... |
22 };</codeblock> |
22 };</codeblock> |
23 <fig id="GUID-C1BDFB57-AAD9-55A2-8E02-D9277BCCE122"> |
23 <fig id="GUID-C1BDFB57-AAD9-55A2-8E02-D9277BCCE122"> |
24 <title>Two elements in a linked list</title> |
24 <title>Two elements in a linked list</title> |
25 <image href="GUID-C014FC75-732F-558F-8E6A-77DDAA032930_d0e316185_href.png" placement="inline"/> |
25 <image href="GUID-C014FC75-732F-558F-8E6A-77DDAA032930_d0e322175_href.png" placement="inline"/> |
26 </fig> |
26 </fig> |
27 <p>Although any kind of object can be an element of a linked list, most lists |
27 <p>Although any kind of object can be an element of a linked list, most lists |
28 consist of elements which are all of the same type.</p> |
28 consist of elements which are all of the same type.</p> |
29 <p>An object can participate in more than one list. For example, to allow <codeph>CMyClass</codeph> objects |
29 <p>An object can participate in more than one list. For example, to allow <codeph>CMyClass</codeph> objects |
30 to participate in two singly linked lists, include two separate <codeph>TSglQueLink</codeph> objects |
30 to participate in two singly linked lists, include two separate <codeph>TSglQueLink</codeph> objects |
37 TSglQueLink iSlink2; |
37 TSglQueLink iSlink2; |
38 };</codeblock> |
38 };</codeblock> |
39 <fig id="GUID-AA2CB21D-B848-5ADF-8B0E-7E2928C84DBE"> |
39 <fig id="GUID-AA2CB21D-B848-5ADF-8B0E-7E2928C84DBE"> |
40 <title>An example of two elements, in two lists where they are consecutive |
40 <title>An example of two elements, in two lists where they are consecutive |
41 elements in both lists</title> |
41 elements in both lists</title> |
42 <image href="GUID-773A0EDC-F17C-553B-BEC3-DA990F5064B7_d0e316211_href.png" placement="inline"/> |
42 <image href="GUID-773A0EDC-F17C-553B-BEC3-DA990F5064B7_d0e322201_href.png" placement="inline"/> |
43 </fig> |
43 </fig> |
44 <p>Elements can also be objects constructed from a variety of classes, all |
44 <p>Elements can also be objects constructed from a variety of classes, all |
45 ultimately derived from the same base class, where that base class includes |
45 ultimately derived from the same base class, where that base class includes |
46 the link object as a component. For example, if <codeph>CBc</codeph> is a |
46 the link object as a component. For example, if <codeph>CBc</codeph> is a |
47 base class for <codeph>CDc1</codeph> which, in turn, is a base class for <codeph>CDc2</codeph>, |
47 base class for <codeph>CDc1</codeph> which, in turn, is a base class for <codeph>CDc2</codeph>, |
62 ... |
62 ... |
63 } |
63 } |
64 </codeblock> |
64 </codeblock> |
65 <fig id="GUID-408F856C-86C0-5ED2-A61D-2F81B41566DD"> |
65 <fig id="GUID-408F856C-86C0-5ED2-A61D-2F81B41566DD"> |
66 <title>Example of a linked list of different element types</title> |
66 <title>Example of a linked list of different element types</title> |
67 <image href="GUID-935057C9-8FA9-5B41-A36C-03A825C51B32_d0e316249_href.png" placement="inline"/> |
67 <image href="GUID-935057C9-8FA9-5B41-A36C-03A825C51B32_d0e322239_href.png" placement="inline"/> |
68 </fig> |
68 </fig> |
69 <p>Note that the link object is at the same offset in each element in this |
69 <p>Note that the link object is at the same offset in each element in this |
70 list.</p> |
70 list.</p> |
71 <p>New link elements can be inserted at the beginning or the end of the list, |
71 <p>New link elements can be inserted at the beginning or the end of the list, |
72 but not into the middle of the list. The functionality for this is provided |
72 but not into the middle of the list. The functionality for this is provided |