Ignore:
Timestamp:
Feb 8, 2012, 2:13:08 PM (12 years ago)
Author:
chronos
Message:
  • Modified: TGTree structure.
Location:
Generics/NativeGenerics
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Generics/NativeGenerics/Demo/Demo.lpi

    r324 r326  
    3838      </Item2>
    3939    </RequiredPackages>
    40     <Units Count="69">
     40    <Units Count="71">
    4141      <Unit0>
    4242        <Filename Value="Demo.lpr"/>
    4343        <IsPartOfProject Value="True"/>
    4444        <UnitName Value="Demo"/>
    45         <EditorIndex Value="17"/>
     45        <EditorIndex Value="19"/>
    4646        <WindowIndex Value="0"/>
    4747        <TopLine Value="1"/>
     
    5757        <ResourceBaseClass Value="Form"/>
    5858        <UnitName Value="UMainForm"/>
     59        <IsVisibleTab Value="True"/>
    5960        <EditorIndex Value="0"/>
    6061        <WindowIndex Value="0"/>
    61         <TopLine Value="166"/>
    62         <CursorPos X="1" Y="179"/>
     62        <TopLine Value="753"/>
     63        <CursorPos X="3" Y="765"/>
    6364        <UsageCount Value="233"/>
    6465        <Bookmarks Count="1">
    65           <Item0 X="65" Y="275" ID="2"/>
     66          <Item0 X="65" Y="277" ID="2"/>
    6667        </Bookmarks>
    6768        <Loaded Value="True"/>
     
    7576        <TopLine Value="47"/>
    7677        <CursorPos X="20" Y="60"/>
    77         <UsageCount Value="5"/>
     78        <UsageCount Value="4"/>
    7879        <DefaultSyntaxHighlighter Value="Delphi"/>
    7980      </Unit2>
     
    8384        <TopLine Value="1"/>
    8485        <CursorPos X="25" Y="13"/>
    85         <UsageCount Value="10"/>
     86        <UsageCount Value="9"/>
    8687        <DefaultSyntaxHighlighter Value="None"/>
    8788      </Unit3>
     
    9192        <TopLine Value="1"/>
    9293        <CursorPos X="21" Y="4"/>
    93         <UsageCount Value="1"/>
     94        <UsageCount Value="0"/>
    9495        <DefaultSyntaxHighlighter Value="None"/>
    9596      </Unit4>
     
    100101        <TopLine Value="1"/>
    101102        <CursorPos X="1" Y="25"/>
    102         <UsageCount Value="1"/>
     103        <UsageCount Value="0"/>
    103104        <DefaultSyntaxHighlighter Value="Delphi"/>
    104105      </Unit5>
     
    108109        <TopLine Value="1"/>
    109110        <CursorPos X="1" Y="3"/>
    110         <UsageCount Value="1"/>
     111        <UsageCount Value="0"/>
    111112        <DefaultSyntaxHighlighter Value="None"/>
    112113      </Unit6>
     
    116117        <TopLine Value="1"/>
    117118        <CursorPos X="7" Y="4"/>
    118         <UsageCount Value="1"/>
     119        <UsageCount Value="0"/>
    119120        <DefaultSyntaxHighlighter Value="None"/>
    120121      </Unit7>
     
    125126        <TopLine Value="1"/>
    126127        <CursorPos X="14" Y="15"/>
    127         <UsageCount Value="1"/>
     128        <UsageCount Value="0"/>
    128129        <DefaultSyntaxHighlighter Value="Delphi"/>
    129130      </Unit8>
     
    133134        <TopLine Value="1"/>
    134135        <CursorPos X="14" Y="18"/>
    135         <UsageCount Value="1"/>
     136        <UsageCount Value="0"/>
    136137        <DefaultSyntaxHighlighter Value="None"/>
    137138      </Unit9>
     
    142143        <TopLine Value="2"/>
    143144        <CursorPos X="30" Y="8"/>
    144         <UsageCount Value="1"/>
     145        <UsageCount Value="0"/>
    145146        <DefaultSyntaxHighlighter Value="Delphi"/>
    146147      </Unit10>
     
    151152        <TopLine Value="13"/>
    152153        <CursorPos X="15" Y="12"/>
    153         <UsageCount Value="3"/>
     154        <UsageCount Value="2"/>
    154155        <DefaultSyntaxHighlighter Value="Delphi"/>
    155156      </Unit11>
     
    159160        <TopLine Value="359"/>
    160161        <CursorPos X="62" Y="376"/>
    161         <UsageCount Value="102"/>
     162        <UsageCount Value="101"/>
    162163        <DefaultSyntaxHighlighter Value="Delphi"/>
    163164      </Unit12>
     
    167168        <TopLine Value="31"/>
    168169        <CursorPos X="44" Y="47"/>
    169         <UsageCount Value="89"/>
     170        <UsageCount Value="88"/>
    170171        <DefaultSyntaxHighlighter Value="Delphi"/>
    171172      </Unit13>
     
    175176        <TopLine Value="1"/>
    176177        <CursorPos X="36" Y="48"/>
    177         <UsageCount Value="89"/>
     178        <UsageCount Value="88"/>
    178179        <DefaultSyntaxHighlighter Value="Delphi"/>
    179180      </Unit14>
     
    183184        <TopLine Value="3"/>
    184185        <CursorPos X="1" Y="3"/>
    185         <UsageCount Value="89"/>
     186        <UsageCount Value="88"/>
    186187        <DefaultSyntaxHighlighter Value="Delphi"/>
    187188      </Unit15>
     
    191192        <TopLine Value="11"/>
    192193        <CursorPos X="42" Y="11"/>
    193         <UsageCount Value="89"/>
     194        <UsageCount Value="88"/>
    194195        <DefaultSyntaxHighlighter Value="Delphi"/>
    195196      </Unit16>
     
    199200        <TopLine Value="3"/>
    200201        <CursorPos X="1" Y="3"/>
    201         <UsageCount Value="89"/>
     202        <UsageCount Value="88"/>
    202203        <DefaultSyntaxHighlighter Value="Delphi"/>
    203204      </Unit17>
     
    207208        <TopLine Value="1"/>
    208209        <CursorPos X="22" Y="30"/>
    209         <UsageCount Value="89"/>
     210        <UsageCount Value="88"/>
    210211        <DefaultSyntaxHighlighter Value="Delphi"/>
    211212      </Unit18>
     
    216217        <TopLine Value="6"/>
    217218        <CursorPos X="56" Y="36"/>
    218         <UsageCount Value="88"/>
     219        <UsageCount Value="87"/>
    219220        <DefaultSyntaxHighlighter Value="Delphi"/>
    220221      </Unit19>
     
    225226        <TopLine Value="27"/>
    226227        <CursorPos X="50" Y="59"/>
    227         <UsageCount Value="87"/>
     228        <UsageCount Value="86"/>
    228229        <DefaultSyntaxHighlighter Value="Delphi"/>
    229230      </Unit20>
     
    234235        <TopLine Value="57"/>
    235236        <CursorPos X="48" Y="85"/>
    236         <UsageCount Value="87"/>
     237        <UsageCount Value="86"/>
    237238        <DefaultSyntaxHighlighter Value="Delphi"/>
    238239      </Unit21>
     
    242243        <TopLine Value="1"/>
    243244        <CursorPos X="33" Y="14"/>
    244         <UsageCount Value="87"/>
     245        <UsageCount Value="86"/>
    245246        <DefaultSyntaxHighlighter Value="Delphi"/>
    246247      </Unit22>
     
    251252        <TopLine Value="52"/>
    252253        <CursorPos X="1" Y="81"/>
    253         <UsageCount Value="87"/>
     254        <UsageCount Value="86"/>
    254255        <DefaultSyntaxHighlighter Value="Delphi"/>
    255256      </Unit23>
     
    260261        <TopLine Value="29"/>
    261262        <CursorPos X="1" Y="62"/>
    262         <UsageCount Value="87"/>
     263        <UsageCount Value="86"/>
    263264        <DefaultSyntaxHighlighter Value="Delphi"/>
    264265      </Unit24>
     
    269270        <TopLine Value="9"/>
    270271        <CursorPos X="60" Y="36"/>
    271         <UsageCount Value="86"/>
     272        <UsageCount Value="85"/>
    272273        <DefaultSyntaxHighlighter Value="Delphi"/>
    273274      </Unit25>
     
    277278        <TopLine Value="9"/>
    278279        <CursorPos X="28" Y="23"/>
    279         <UsageCount Value="98"/>
     280        <UsageCount Value="97"/>
    280281        <DefaultSyntaxHighlighter Value="Delphi"/>
    281282      </Unit26>
     
    286287        <TopLine Value="2624"/>
    287288        <CursorPos X="37" Y="2636"/>
    288         <UsageCount Value="85"/>
     289        <UsageCount Value="84"/>
    289290        <DefaultSyntaxHighlighter Value="Delphi"/>
    290291      </Unit27>
     
    294295        <TopLine Value="94"/>
    295296        <CursorPos X="1" Y="1"/>
    296         <UsageCount Value="1"/>
     297        <UsageCount Value="0"/>
    297298        <DefaultSyntaxHighlighter Value="XML"/>
    298299      </Unit28>
     
    302303        <TopLine Value="199"/>
    303304        <CursorPos X="14" Y="213"/>
    304         <UsageCount Value="23"/>
     305        <UsageCount Value="22"/>
    305306        <DefaultSyntaxHighlighter Value="Delphi"/>
    306307      </Unit29>
     
    310311        <TopLine Value="199"/>
    311312        <CursorPos X="3" Y="201"/>
    312         <UsageCount Value="23"/>
     313        <UsageCount Value="22"/>
    313314        <DefaultSyntaxHighlighter Value="Delphi"/>
    314315      </Unit30>
     
    318319        <TopLine Value="1"/>
    319320        <CursorPos X="21" Y="20"/>
    320         <UsageCount Value="14"/>
     321        <UsageCount Value="13"/>
    321322        <DefaultSyntaxHighlighter Value="Delphi"/>
    322323      </Unit31>
     
    327328        <TopLine Value="1"/>
    328329        <CursorPos X="27" Y="26"/>
    329         <UsageCount Value="23"/>
     330        <UsageCount Value="22"/>
    330331        <DefaultSyntaxHighlighter Value="Delphi"/>
    331332      </Unit32>
     
    335336        <TopLine Value="381"/>
    336337        <CursorPos X="3" Y="398"/>
    337         <UsageCount Value="23"/>
     338        <UsageCount Value="22"/>
    338339        <DefaultSyntaxHighlighter Value="Delphi"/>
    339340      </Unit33>
     
    343344        <TopLine Value="475"/>
    344345        <CursorPos X="10" Y="503"/>
    345         <UsageCount Value="2"/>
     346        <UsageCount Value="1"/>
    346347        <DefaultSyntaxHighlighter Value="Delphi"/>
    347348      </Unit34>
     
    351352        <TopLine Value="2270"/>
    352353        <CursorPos X="22" Y="2273"/>
    353         <UsageCount Value="14"/>
     354        <UsageCount Value="13"/>
    354355        <DefaultSyntaxHighlighter Value="Delphi"/>
    355356      </Unit35>
     
    360361        <TopLine Value="1"/>
    361362        <CursorPos X="25" Y="41"/>
    362         <UsageCount Value="14"/>
     363        <UsageCount Value="13"/>
    363364        <DefaultSyntaxHighlighter Value="Delphi"/>
    364365      </Unit36>
     
    368369        <TopLine Value="1"/>
    369370        <CursorPos X="28" Y="10"/>
    370         <UsageCount Value="4"/>
     371        <UsageCount Value="3"/>
    371372        <DefaultSyntaxHighlighter Value="None"/>
    372373      </Unit37>
     
    376377        <TopLine Value="38"/>
    377378        <CursorPos X="3" Y="50"/>
    378         <UsageCount Value="6"/>
     379        <UsageCount Value="5"/>
    379380        <DefaultSyntaxHighlighter Value="Delphi"/>
    380381      </Unit38>
     
    384385        <TopLine Value="649"/>
    385386        <CursorPos X="38" Y="671"/>
    386         <UsageCount Value="5"/>
     387        <UsageCount Value="4"/>
    387388        <DefaultSyntaxHighlighter Value="Delphi"/>
    388389      </Unit39>
     
    392393        <TopLine Value="1185"/>
    393394        <CursorPos X="22" Y="1196"/>
    394         <UsageCount Value="5"/>
     395        <UsageCount Value="4"/>
    395396        <DefaultSyntaxHighlighter Value="Delphi"/>
    396397      </Unit40>
     
    401402        <TopLine Value="112"/>
    402403        <CursorPos X="3" Y="124"/>
    403         <UsageCount Value="5"/>
     404        <UsageCount Value="4"/>
    404405        <DefaultSyntaxHighlighter Value="Delphi"/>
    405406      </Unit41>
     
    409410        <TopLine Value="71"/>
    410411        <CursorPos X="10" Y="84"/>
    411         <UsageCount Value="5"/>
     412        <UsageCount Value="4"/>
    412413        <DefaultSyntaxHighlighter Value="Delphi"/>
    413414      </Unit42>
     
    417418        <TopLine Value="148"/>
    418419        <CursorPos X="11" Y="169"/>
    419         <UsageCount Value="5"/>
     420        <UsageCount Value="4"/>
    420421        <DefaultSyntaxHighlighter Value="Delphi"/>
    421422      </Unit43>
     
    425426        <TopLine Value="511"/>
    426427        <CursorPos X="11" Y="524"/>
    427         <UsageCount Value="5"/>
     428        <UsageCount Value="4"/>
    428429        <DefaultSyntaxHighlighter Value="Delphi"/>
    429430      </Unit44>
     
    433434        <TopLine Value="411"/>
    434435        <CursorPos X="10" Y="424"/>
    435         <UsageCount Value="5"/>
     436        <UsageCount Value="4"/>
    436437        <DefaultSyntaxHighlighter Value="Delphi"/>
    437438      </Unit45>
     
    439440        <Filename Value="../Units/GenericList.pas"/>
    440441        <UnitName Value="GenericList"/>
    441         <EditorIndex Value="11"/>
    442         <WindowIndex Value="0"/>
    443         <TopLine Value="7"/>
    444         <CursorPos X="3" Y="8"/>
    445         <UsageCount Value="40"/>
     442        <EditorIndex Value="13"/>
     443        <WindowIndex Value="0"/>
     444        <TopLine Value="666"/>
     445        <CursorPos X="24" Y="691"/>
     446        <UsageCount Value="41"/>
    446447        <Loaded Value="True"/>
    447448      </Unit46>
     
    449450        <Filename Value="../Units/GenericMatrix.pas"/>
    450451        <UnitName Value="GenericMatrix"/>
    451         <IsVisibleTab Value="True"/>
    452         <EditorIndex Value="16"/>
    453         <WindowIndex Value="0"/>
    454         <TopLine Value="92"/>
    455         <CursorPos X="5" Y="106"/>
    456         <UsageCount Value="18"/>
     452        <EditorIndex Value="18"/>
     453        <WindowIndex Value="0"/>
     454        <TopLine Value="37"/>
     455        <CursorPos X="34" Y="48"/>
     456        <UsageCount Value="19"/>
    457457        <Loaded Value="True"/>
    458458      </Unit47>
     
    460460        <Filename Value="../Units/GenericStream.pas"/>
    461461        <UnitName Value="GenericStream"/>
    462         <EditorIndex Value="9"/>
     462        <EditorIndex Value="11"/>
    463463        <WindowIndex Value="0"/>
    464464        <TopLine Value="34"/>
    465465        <CursorPos X="18" Y="48"/>
    466         <UsageCount Value="18"/>
     466        <UsageCount Value="19"/>
    467467        <Loaded Value="True"/>
    468468      </Unit48>
     
    473473        <TopLine Value="18"/>
    474474        <CursorPos X="24" Y="28"/>
    475         <UsageCount Value="13"/>
     475        <UsageCount Value="12"/>
    476476      </Unit49>
    477477      <Unit50>
    478478        <Filename Value="../Units/GenericDictionary.pas"/>
    479479        <UnitName Value="GenericDictionary"/>
    480         <EditorIndex Value="15"/>
     480        <EditorIndex Value="17"/>
    481481        <WindowIndex Value="0"/>
    482482        <TopLine Value="1"/>
    483483        <CursorPos X="1" Y="1"/>
    484         <UsageCount Value="19"/>
     484        <UsageCount Value="20"/>
    485485        <Loaded Value="True"/>
    486486      </Unit50>
    487487      <Unit51>
    488488        <Filename Value="../../../../../Lazarus/0.9.31_2.6.0/fpc/2.6.0/source/rtl/objpas/sysutils/sysunih.inc"/>
    489         <EditorIndex Value="14"/>
     489        <EditorIndex Value="16"/>
    490490        <WindowIndex Value="0"/>
    491491        <TopLine Value="9"/>
    492492        <CursorPos X="10" Y="22"/>
    493         <UsageCount Value="19"/>
     493        <UsageCount Value="20"/>
    494494        <Loaded Value="True"/>
    495495        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    498498        <Filename Value="../Units/SpecializedList.pas"/>
    499499        <UnitName Value="SpecializedList"/>
    500         <EditorIndex Value="18"/>
     500        <EditorIndex Value="20"/>
    501501        <WindowIndex Value="0"/>
    502502        <TopLine Value="45"/>
    503503        <CursorPos X="1" Y="68"/>
    504         <UsageCount Value="19"/>
     504        <UsageCount Value="20"/>
    505505        <Loaded Value="True"/>
    506506      </Unit52>
    507507      <Unit53>
    508508        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/fpc/2.7.1/source/rtl/objpas/classes/classesh.inc"/>
    509         <EditorIndex Value="10"/>
     509        <EditorIndex Value="12"/>
    510510        <WindowIndex Value="0"/>
    511511        <TopLine Value="257"/>
    512512        <CursorPos X="3" Y="270"/>
    513         <UsageCount Value="16"/>
     513        <UsageCount Value="17"/>
    514514        <Loaded Value="True"/>
    515515      </Unit53>
     
    520520        <TopLine Value="1"/>
    521521        <CursorPos X="1" Y="1"/>
    522         <UsageCount Value="13"/>
     522        <UsageCount Value="12"/>
    523523      </Unit54>
    524524      <Unit55>
     
    528528        <TopLine Value="22"/>
    529529        <CursorPos X="14" Y="38"/>
    530         <UsageCount Value="13"/>
     530        <UsageCount Value="12"/>
    531531      </Unit55>
    532532      <Unit56>
    533533        <Filename Value="../Units/GenericRange.pas"/>
    534534        <UnitName Value="GenericRange"/>
    535         <EditorIndex Value="12"/>
     535        <EditorIndex Value="14"/>
    536536        <WindowIndex Value="0"/>
    537537        <TopLine Value="4"/>
    538         <CursorPos X="33" Y="8"/>
    539         <UsageCount Value="19"/>
     538        <CursorPos X="6" Y="16"/>
     539        <UsageCount Value="20"/>
    540540        <Loaded Value="True"/>
    541541      </Unit56>
     
    545545        <TopLine Value="958"/>
    546546        <CursorPos X="11" Y="971"/>
    547         <UsageCount Value="13"/>
     547        <UsageCount Value="12"/>
    548548      </Unit57>
    549549      <Unit58>
    550550        <Filename Value="../Units/GenericTree.pas"/>
    551551        <UnitName Value="GenericTree"/>
    552         <EditorIndex Value="13"/>
    553         <WindowIndex Value="0"/>
    554         <TopLine Value="1"/>
    555         <CursorPos X="1" Y="1"/>
    556         <UsageCount Value="19"/>
     552        <EditorIndex Value="15"/>
     553        <WindowIndex Value="0"/>
     554        <TopLine Value="124"/>
     555        <CursorPos X="6" Y="125"/>
     556        <UsageCount Value="20"/>
    557557        <Loaded Value="True"/>
    558558      </Unit58>
     
    560560        <Filename Value="../Units/GenericString.pas"/>
    561561        <UnitName Value="GenericString"/>
    562         <EditorIndex Value="19"/>
     562        <EditorIndex Value="21"/>
    563563        <WindowIndex Value="0"/>
    564564        <TopLine Value="35"/>
    565565        <CursorPos X="23" Y="40"/>
    566         <UsageCount Value="12"/>
     566        <UsageCount Value="13"/>
    567567        <Loaded Value="True"/>
    568568      </Unit59>
     
    570570        <Filename Value="../Units/GenericBitmap.pas"/>
    571571        <UnitName Value="GenericBitmap"/>
    572         <EditorIndex Value="20"/>
     572        <EditorIndex Value="22"/>
    573573        <WindowIndex Value="0"/>
    574574        <TopLine Value="22"/>
    575575        <CursorPos X="18" Y="46"/>
    576         <UsageCount Value="11"/>
     576        <UsageCount Value="12"/>
    577577        <Loaded Value="True"/>
    578578      </Unit60>
     
    580580        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/graphics.pp"/>
    581581        <UnitName Value="Graphics"/>
    582         <EditorIndex Value="1"/>
     582        <EditorIndex Value="3"/>
    583583        <WindowIndex Value="0"/>
    584584        <TopLine Value="1151"/>
    585585        <CursorPos X="22" Y="1165"/>
    586         <UsageCount Value="11"/>
     586        <UsageCount Value="12"/>
    587587        <Loaded Value="True"/>
    588588      </Unit61>
    589589      <Unit62>
    590590        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/include/rasterimage.inc"/>
    591         <EditorIndex Value="8"/>
     591        <EditorIndex Value="10"/>
    592592        <WindowIndex Value="0"/>
    593593        <TopLine Value="310"/>
    594594        <CursorPos X="22" Y="314"/>
    595         <UsageCount Value="11"/>
     595        <UsageCount Value="12"/>
    596596        <Loaded Value="True"/>
    597597      </Unit62>
    598598      <Unit63>
    599599        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/include/bitmapcanvas.inc"/>
    600         <EditorIndex Value="7"/>
     600        <EditorIndex Value="9"/>
    601601        <WindowIndex Value="0"/>
    602602        <TopLine Value="53"/>
    603603        <CursorPos X="3" Y="46"/>
    604         <UsageCount Value="11"/>
     604        <UsageCount Value="12"/>
    605605        <Loaded Value="True"/>
    606606      </Unit63>
     
    608608        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/fpc/2.7.1/source/packages/fcl-image/src/fpcanvas.pp"/>
    609609        <UnitName Value="FPCanvas"/>
    610         <EditorIndex Value="4"/>
     610        <EditorIndex Value="6"/>
    611611        <WindowIndex Value="0"/>
    612612        <TopLine Value="347"/>
    613613        <CursorPos X="15" Y="360"/>
    614         <UsageCount Value="11"/>
     614        <UsageCount Value="12"/>
    615615        <Loaded Value="True"/>
    616616      </Unit64>
    617617      <Unit65>
    618618        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/fpc/2.7.1/source/packages/fcl-image/src/fpcanvas.inc"/>
    619         <EditorIndex Value="6"/>
     619        <EditorIndex Value="8"/>
    620620        <WindowIndex Value="0"/>
    621621        <TopLine Value="308"/>
    622622        <CursorPos X="3" Y="310"/>
    623         <UsageCount Value="11"/>
     623        <UsageCount Value="12"/>
    624624        <Loaded Value="True"/>
    625625      </Unit65>
    626626      <Unit66>
    627627        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/fpc/2.7.1/source/packages/fcl-image/src/fpcdrawh.inc"/>
    628         <EditorIndex Value="5"/>
     628        <EditorIndex Value="7"/>
    629629        <WindowIndex Value="0"/>
    630630        <TopLine Value="54"/>
    631631        <CursorPos X="3" Y="63"/>
    632         <UsageCount Value="11"/>
     632        <UsageCount Value="12"/>
    633633        <Loaded Value="True"/>
    634634      </Unit66>
    635635      <Unit67>
    636636        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/include/canvas.inc"/>
    637         <EditorIndex Value="2"/>
     637        <EditorIndex Value="4"/>
    638638        <WindowIndex Value="0"/>
    639639        <TopLine Value="147"/>
    640640        <CursorPos X="3" Y="152"/>
    641         <UsageCount Value="11"/>
     641        <UsageCount Value="12"/>
    642642        <Loaded Value="True"/>
    643643      </Unit67>
     
    645645        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/interfacebase.pp"/>
    646646        <UnitName Value="InterfaceBase"/>
    647         <EditorIndex Value="3"/>
     647        <EditorIndex Value="5"/>
    648648        <WindowIndex Value="0"/>
    649649        <TopLine Value="153"/>
    650650        <CursorPos X="15" Y="166"/>
     651        <UsageCount Value="12"/>
     652        <Loaded Value="True"/>
     653      </Unit68>
     654      <Unit69>
     655        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/comctrls.pp"/>
     656        <UnitName Value="ComCtrls"/>
     657        <EditorIndex Value="1"/>
     658        <WindowIndex Value="0"/>
     659        <TopLine Value="2962"/>
     660        <CursorPos X="3" Y="2975"/>
    651661        <UsageCount Value="11"/>
    652662        <Loaded Value="True"/>
    653       </Unit68>
     663      </Unit69>
     664      <Unit70>
     665        <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/include/treeview.inc"/>
     666        <EditorIndex Value="2"/>
     667        <WindowIndex Value="0"/>
     668        <TopLine Value="5239"/>
     669        <CursorPos X="3" Y="5243"/>
     670        <UsageCount Value="11"/>
     671        <Loaded Value="True"/>
     672      </Unit70>
    654673    </Units>
    655674    <JumpHistory Count="30" HistoryIndex="29">
    656675      <Position1>
    657         <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/graphics.pp"/>
    658         <Caret Line="2342" Column="15" TopLine="2329"/>
     676        <Filename Value="../Units/GenericList.pas"/>
     677        <Caret Line="107" Column="15" TopLine="94"/>
    659678      </Position1>
    660679      <Position2>
    661         <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/graphics.pp"/>
    662         <Caret Line="1008" Column="3" TopLine="995"/>
     680        <Filename Value="UMainForm.pas"/>
     681        <Caret Line="138" Column="17" TopLine="125"/>
    663682      </Position2>
    664683      <Position3>
    665         <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/graphics.pp"/>
    666         <Caret Line="1182" Column="17" TopLine="1169"/>
     684        <Filename Value="UMainForm.pas"/>
     685        <Caret Line="143" Column="23" TopLine="130"/>
    667686      </Position3>
    668687      <Position4>
    669         <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/graphics.pp"/>
    670         <Caret Line="1176" Column="67" TopLine="1169"/>
     688        <Filename Value="UMainForm.pas"/>
     689        <Caret Line="257" Column="24" TopLine="243"/>
    671690      </Position4>
    672691      <Position5>
    673         <Filename Value="../Units/GenericMatrix.pas"/>
    674         <Caret Line="35" Column="14" TopLine="73"/>
     692        <Filename Value="UMainForm.pas"/>
     693        <Caret Line="10" Column="27" TopLine="1"/>
    675694      </Position5>
    676695      <Position6>
    677         <Filename Value="../Units/GenericMatrix.pas"/>
    678         <Caret Line="28" Column="51" TopLine="17"/>
     696        <Filename Value="UMainForm.pas"/>
     697        <Caret Line="35" Column="15" TopLine="22"/>
    679698      </Position6>
    680699      <Position7>
    681         <Filename Value="../Units/GenericMatrix.pas"/>
    682         <Caret Line="13" Column="6" TopLine="18"/>
     700        <Filename Value="UMainForm.pas"/>
     701        <Caret Line="160" Column="1" TopLine="137"/>
    683702      </Position7>
    684703      <Position8>
    685         <Filename Value="../Units/GenericMatrix.pas"/>
    686         <Caret Line="30" Column="43" TopLine="9"/>
     704        <Filename Value="UMainForm.pas"/>
     705        <Caret Line="45" Column="15" TopLine="32"/>
    687706      </Position8>
    688707      <Position9>
    689         <Filename Value="../Units/GenericMatrix.pas"/>
    690         <Caret Line="34" Column="36" TopLine="21"/>
     708        <Filename Value="UMainForm.pas"/>
     709        <Caret Line="190" Column="3" TopLine="183"/>
    691710      </Position9>
    692711      <Position10>
    693         <Filename Value="../Units/GenericMatrix.pas"/>
    694         <Caret Line="30" Column="45" TopLine="22"/>
     712        <Filename Value="UMainForm.pas"/>
     713        <Caret Line="107" Column="1" TopLine="90"/>
    695714      </Position10>
    696715      <Position11>
    697716        <Filename Value="UMainForm.pas"/>
    698         <Caret Line="47" Column="1" TopLine="34"/>
     717        <Caret Line="801" Column="9" TopLine="782"/>
    699718      </Position11>
    700719      <Position12>
    701         <Filename Value="../Units/GenericMatrix.pas"/>
    702         <Caret Line="57" Column="21" TopLine="44"/>
     720        <Filename Value="UMainForm.pas"/>
     721        <Caret Line="10" Column="40" TopLine="1"/>
    703722      </Position12>
    704723      <Position13>
    705         <Filename Value="../Units/GenericMatrix.pas"/>
    706         <Caret Line="81" Column="1" TopLine="78"/>
     724        <Filename Value="UMainForm.pas"/>
     725        <Caret Line="67" Column="15" TopLine="54"/>
    707726      </Position13>
    708727      <Position14>
    709         <Filename Value="../Units/GenericMatrix.pas"/>
    710         <Caret Line="55" Column="56" TopLine="30"/>
     728        <Filename Value="UMainForm.pas"/>
     729        <Caret Line="45" Column="30" TopLine="33"/>
    711730      </Position14>
    712731      <Position15>
    713         <Filename Value="../Units/GenericMatrix.pas"/>
    714         <Caret Line="98" Column="1" TopLine="75"/>
     732        <Filename Value="UMainForm.pas"/>
     733        <Caret Line="67" Column="15" TopLine="54"/>
    715734      </Position15>
    716735      <Position16>
    717         <Filename Value="../Units/GenericMatrix.pas"/>
    718         <Caret Line="59" Column="40" TopLine="36"/>
     736        <Filename Value="UMainForm.pas"/>
     737        <Caret Line="798" Column="60" TopLine="781"/>
    719738      </Position16>
    720739      <Position17>
    721         <Filename Value="../Units/GenericMatrix.pas"/>
    722         <Caret Line="48" Column="39" TopLine="35"/>
     740        <Filename Value="UMainForm.pas"/>
     741        <Caret Line="67" Column="15" TopLine="54"/>
    723742      </Position17>
    724743      <Position18>
    725         <Filename Value="../Units/GenericMatrix.pas"/>
    726         <Caret Line="67" Column="1" TopLine="46"/>
     744        <Filename Value="../Units/GenericTree.pas"/>
     745        <Caret Line="52" Column="27" TopLine="16"/>
    727746      </Position18>
    728747      <Position19>
    729         <Filename Value="../Units/GenericMatrix.pas"/>
    730         <Caret Line="104" Column="53" TopLine="91"/>
     748        <Filename Value="UMainForm.pas"/>
     749        <Caret Line="67" Column="15" TopLine="54"/>
    731750      </Position19>
    732751      <Position20>
    733         <Filename Value="../Units/GenericMatrix.pas"/>
    734         <Caret Line="181" Column="26" TopLine="168"/>
     752        <Filename Value="../Units/GenericTree.pas"/>
     753        <Caret Line="42" Column="1" TopLine="20"/>
    735754      </Position20>
    736755      <Position21>
    737         <Filename Value="../Units/GenericMatrix.pas"/>
    738         <Caret Line="53" Column="80" TopLine="40"/>
     756        <Filename Value="UMainForm.pas"/>
     757        <Caret Line="56" Column="17" TopLine="16"/>
    739758      </Position21>
    740759      <Position22>
    741         <Filename Value="../Units/GenericMatrix.pas"/>
    742         <Caret Line="57" Column="14" TopLine="44"/>
     760        <Filename Value="UMainForm.pas"/>
     761        <Caret Line="68" Column="15" TopLine="55"/>
    743762      </Position22>
    744763      <Position23>
    745         <Filename Value="../Units/GenericMatrix.pas"/>
    746         <Caret Line="50" Column="39" TopLine="37"/>
     764        <Filename Value="UMainForm.pas"/>
     765        <Caret Line="69" Column="17" TopLine="56"/>
    747766      </Position23>
    748767      <Position24>
    749         <Filename Value="../Units/GenericMatrix.pas"/>
    750         <Caret Line="57" Column="14" TopLine="44"/>
     768        <Filename Value="UMainForm.pas"/>
     769        <Caret Line="68" Column="15" TopLine="55"/>
    751770      </Position24>
    752771      <Position25>
    753         <Filename Value="../Units/GenericMatrix.pas"/>
    754         <Caret Line="49" Column="3" TopLine="37"/>
     772        <Filename Value="UMainForm.pas"/>
     773        <Caret Line="69" Column="17" TopLine="56"/>
    755774      </Position25>
    756775      <Position26>
    757         <Filename Value="../Units/GenericMatrix.pas"/>
    758         <Caret Line="54" Column="35" TopLine="41"/>
     776        <Filename Value="UMainForm.pas"/>
     777        <Caret Line="68" Column="15" TopLine="55"/>
    759778      </Position26>
    760779      <Position27>
    761         <Filename Value="../Units/GenericMatrix.pas"/>
    762         <Caret Line="49" Column="1" TopLine="41"/>
     780        <Filename Value="UMainForm.pas"/>
     781        <Caret Line="69" Column="17" TopLine="56"/>
    763782      </Position27>
    764783      <Position28>
    765         <Filename Value="../Units/GenericMatrix.pas"/>
    766         <Caret Line="56" Column="1" TopLine="44"/>
     784        <Filename Value="UMainForm.pas"/>
     785        <Caret Line="771" Column="17" TopLine="758"/>
    767786      </Position28>
    768787      <Position29>
    769         <Filename Value="../Units/GenericMatrix.pas"/>
    770         <Caret Line="639" Column="28" TopLine="628"/>
     788        <Filename Value="UMainForm.pas"/>
     789        <Caret Line="776" Column="27" TopLine="758"/>
    771790      </Position29>
    772791      <Position30>
    773         <Filename Value="../Units/GenericMatrix.pas"/>
    774         <Caret Line="107" Column="18" TopLine="91"/>
     792        <Filename Value="UMainForm.pas"/>
     793        <Caret Line="32" Column="15" TopLine="19"/>
    775794      </Position30>
    776795    </JumpHistory>
     
    827846        <WatchKind Value="wpkWrite"/>
    828847        <Source Value="UMainForm.pas"/>
    829         <Line Value="204"/>
     848        <Line Value="206"/>
    830849      </Item1>
    831850    </BreakPoints>
  • Generics/NativeGenerics/Demo/UMainForm.lfm

    r321 r326  
    44  Top = 104
    55  Width = 692
    6   ActiveControl = ButtonIntegerList
     6  ActiveControl = IntegerListButton
    77  Caption = 'Template generics demo'
    88  ClientHeight = 520
     
    1111  OnDestroy = FormDestroy
    1212  LCLVersion = '0.9.31'
    13   object ButtonIntegerList: TButton
     13  object IntegerListButton: TButton
    1414    Left = 8
    1515    Height = 25
    1616    Top = 8
    17     Width = 128
    18     Caption = 'TListInteger'
    19     OnClick = ButtonIntegerListClick
     17    Width = 152
     18    Caption = 'TList<Integer>'
     19    OnClick = IntegerListButtonClick
    2020    TabOrder = 0
    2121  end
    22   object ButtonStringList: TButton
     22  object StringListButton: TButton
    2323    Left = 8
    2424    Height = 25
    2525    Top = 40
    26     Width = 128
    27     Caption = 'TListString'
    28     OnClick = ButtonStringListClick
     26    Width = 152
     27    Caption = 'TStringList<string>'
     28    OnClick = StringListButtonClick
    2929    TabOrder = 1
    3030  end
    31   object ButtonDictionaryString: TButton
     31  object DictionaryStringButton: TButton
    3232    Left = 8
    3333    Height = 25
    3434    Top = 72
    35     Width = 128
    36     Caption = 'TDictionaryString'
    37     OnClick = ButtonDictionaryStringClick
     35    Width = 152
     36    Caption = 'TDictionary<string,string>'
     37    OnClick = DictionaryStringButtonClick
    3838    TabOrder = 2
    3939  end
    40   object ButtonQueueInteger: TButton
     40  object QueueIntegerButton: TButton
    4141    Left = 8
    4242    Height = 25
    4343    Top = 102
    44     Width = 128
    45     Caption = 'TQueueInteger'
    46     OnClick = ButtonQueueIntegerClick
     44    Width = 152
     45    Caption = 'TQueue<Integer>'
     46    OnClick = QueueIntegerButtonClick
    4747    TabOrder = 3
    4848  end
    49   object ButtonCharList: TButton
     49  object CharListButton: TButton
    5050    Left = 8
    5151    Height = 25
    5252    Top = 134
    53     Width = 128
    54     Caption = 'TListChar(TString)'
    55     OnClick = ButtonCharListClick
     53    Width = 152
     54    Caption = 'TString<Char>'
     55    OnClick = CharListButtonClick
    5656    TabOrder = 4
    5757  end
     
    6060    Height = 24
    6161    Top = 456
    62     Width = 128
     62    Width = 152
    6363    Anchors = [akLeft, akBottom]
    64     Caption = 'TListString'
     64    Caption = 'TStringList<string>'
    6565    OnClick = ButtonBenchmarkListStringClick
    6666    TabOrder = 5
    6767  end
    68   object ButtonListObject: TButton
     68  object ListObjectButton: TButton
    6969    Left = 8
    7070    Height = 25
    7171    Top = 163
    72     Width = 128
    73     Caption = 'TListObject'
    74     OnClick = ButtonListObjectClick
     72    Width = 152
     73    Caption = 'TObjectList<Object>'
     74    OnClick = ListObjectButtonClick
    7575    TabOrder = 6
    7676  end
     
    7979    Height = 25
    8080    Top = 424
    81     Width = 128
     81    Width = 152
    8282    Anchors = [akLeft, akBottom]
    83     Caption = 'TDictionaryStringString'
     83    Caption = 'TDictionary<string,string>'
    8484    OnClick = ButtonBenchmarkDictionaryClick
    8585    TabOrder = 7
    8686  end
    87   object ButtonMatrixInteger: TButton
     87  object MatrixIntegerButton: TButton
    8888    Left = 8
    8989    Height = 25
    9090    Top = 192
    91     Width = 128
    92     Caption = 'TMatrixInteger'
    93     OnClick = ButtonMatrixIntegerClick
     91    Width = 152
     92    Caption = 'TMatrix<Integer>'
     93    OnClick = MatrixIntegerButtonClick
    9494    TabOrder = 8
    9595  end
    9696  object ListViewOutput: TListView
    97     Left = 144
     97    Left = 168
    9898    Height = 491
    9999    Top = 24
    100     Width = 542
     100    Width = 518
    101101    Anchors = [akTop, akLeft, akRight, akBottom]
    102102    Columns = <   
     
    114114  end
    115115  object LabelTestName: TLabel
    116     Left = 144
     116    Left = 168
    117117    Height = 14
    118118    Top = 8
     
    134134    Height = 24
    135135    Top = 488
    136     Width = 128
     136    Width = 152
    137137    Anchors = [akLeft, akBottom]
    138     Caption = 'TListPointer'
     138    Caption = 'TList<Pointer>'
    139139    OnClick = ButtonBenchmarkListPointerClick
    140140    TabOrder = 10
    141141  end
    142   object ButtonStreamByte: TButton
     142  object StreamByteButton: TButton
    143143    Left = 8
    144144    Height = 25
    145145    Top = 224
    146     Width = 128
    147     Caption = 'TStreamByte'
    148     OnClick = ButtonStreamByteClick
     146    Width = 152
     147    Caption = 'TStream<Byte>'
     148    OnClick = StreamByteButtonClick
    149149    TabOrder = 11
    150150  end
     151  object TreeButton: TButton
     152    Left = 8
     153    Height = 25
     154    Top = 256
     155    Width = 152
     156    Caption = 'TTree<string>'
     157    OnClick = TreeButtonClick
     158    TabOrder = 12
     159  end
    151160end
  • Generics/NativeGenerics/Demo/UMainForm.pas

    r324 r326  
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    99  ComCtrls, GenericList, GenericDictionary, GenericQueue, GenericStream,
    10   DateUtils, SpecializedList;
     10  DateUtils, GenericString, GenericTree;
    1111
    1212type
     
    1515
    1616  TMainForm = class(TForm)
    17     ButtonStreamByte: TButton;
     17    TreeButton: TButton;
     18    StreamByteButton: TButton;
    1819    ButtonBenchmarkDictionary: TButton;
    1920    ButtonBenchmarkListPointer: TButton;
    20     ButtonListObject: TButton;
     21    ListObjectButton: TButton;
    2122    ButtonBenchmarkListString: TButton;
    22     ButtonCharList: TButton;
    23     ButtonMatrixInteger: TButton;
    24     ButtonQueueInteger: TButton;
    25     ButtonDictionaryString: TButton;
    26     ButtonIntegerList: TButton;
    27     ButtonStringList: TButton;
     23    CharListButton: TButton;
     24    MatrixIntegerButton: TButton;
     25    QueueIntegerButton: TButton;
     26    DictionaryStringButton: TButton;
     27    IntegerListButton: TButton;
     28    StringListButton: TButton;
    2829    Label1: TLabel;
    2930    LabelTestName: TLabel;
     
    3233    procedure ButtonBenchmarkListPointerClick(Sender: TObject);
    3334    procedure ButtonBenchmarkListStringClick(Sender: TObject);
    34     procedure ButtonCharListClick(Sender: TObject);
    35     procedure ButtonDictionaryStringClick(Sender: TObject);
    36     procedure ButtonIntegerListClick(Sender: TObject);
    37     procedure ButtonMatrixIntegerClick(Sender: TObject);
    38     procedure ButtonListObjectClick(Sender: TObject);
    39     procedure ButtonQueueIntegerClick(Sender: TObject);
    40     procedure ButtonStreamByteClick(Sender: TObject);
    41     procedure ButtonStringListClick(Sender: TObject);
     35    procedure CharListButtonClick(Sender: TObject);
     36    procedure DictionaryStringButtonClick(Sender: TObject);
     37    procedure IntegerListButtonClick(Sender: TObject);
     38    procedure MatrixIntegerButtonClick(Sender: TObject);
     39    procedure ListObjectButtonClick(Sender: TObject);
     40    procedure QueueIntegerButtonClick(Sender: TObject);
     41    procedure StreamByteButtonClick(Sender: TObject);
     42    procedure StringListButtonClick(Sender: TObject);
    4243    procedure FormCreate(Sender: TObject);
    4344    procedure FormDestroy(Sender: TObject);
     45    procedure TreeButtonClick(Sender: TObject);
    4446  private
    4547  public
     
    6365end;
    6466
    65 procedure TMainForm.ButtonIntegerListClick(Sender: TObject);
     67procedure TMainForm.IntegerListButtonClick(Sender: TObject);
    6668var
    6769  List: TGList<Integer>;
     
    7072begin
    7173  ListViewOutput.Clear;
    72   LabelTestName.Caption := 'TListInteger test';
     74  LabelTestName.Caption := 'TGList<Integer> test';
    7375  List := TGList<Integer>.Create;
    7476  List2 := TGList<Integer>.Create;
     
    105107end;
    106108
    107 procedure TMainForm.ButtonMatrixIntegerClick(Sender: TObject);
     109procedure TMainForm.MatrixIntegerButtonClick(Sender: TObject);
    108110//var
    109111//  Matrix: TGMatrix<Integer, Integer, Integer>;
    110112begin
    111113  (*  ListViewOutput.Clear;
    112   LabelTestName.Caption := 'TMatrixInteger test';
     114  LabelTestName.Caption := 'TGMatrix<Integer> test';
    113115  Matrix := TGMatrix<Integer, Integer, Integer>.Create;
    114116  with Matrix do try
     
    133135end;
    134136
    135 procedure TMainForm.ButtonListObjectClick(Sender: TObject);
    136 //var
    137   //List: TListObject<TObject>;
    138   //I: Integer;
    139 begin
    140   (*ListViewOutput.Clear;
    141   LabelTestName.Caption := 'TListObject test';
    142   List := TGListObject<TObject>.Create;
     137procedure TMainForm.ListObjectButtonClick(Sender: TObject);
     138var
     139  List: TGObjectList<TObject>;
     140  I: Integer;
     141begin
     142  ListViewOutput.Clear;
     143  LabelTestName.Caption := 'TObjectList<TObject> test';
     144  List := TGObjectList<TObject>.Create;
    143145  with List do try
    144146    AddArray([TObject.Create, TObject.Create, TObject.Create, TObject.Create]);
     
    155157  finally
    156158    Free;
    157   end;*)
    158 end;
    159 
    160 procedure TMainForm.ButtonQueueIntegerClick(Sender: TObject);
     159  end;
     160end;
     161
     162procedure TMainForm.QueueIntegerButtonClick(Sender: TObject);
    161163var
    162164  Queue: TGQueue<Integer>;
    163165begin
    164166  ListViewOutput.Clear;
    165   LabelTestName.Caption := 'TQueueInteger test';
     167  LabelTestName.Caption := 'TGQueue<Integer> test';
    166168  Queue := TGQueue<Integer>.Create;
    167169  with Queue do try
     
    179181end;
    180182
    181 procedure TMainForm.ButtonStreamByteClick(Sender: TObject);
     183procedure TMainForm.StreamByteButtonClick(Sender: TObject);
    182184var
    183185  Stream: TGStream<Byte>;
     
    187189begin
    188190  ListViewOutput.Clear;
    189   LabelTestName.Caption := 'TStreamByte test';
     191  LabelTestName.Caption := 'TGStream<Byte> test';
    190192  Stream := TGStream<Byte>.Create;
    191193  with Stream do try
     
    221223end;
    222224
    223 procedure TMainForm.ButtonDictionaryStringClick(Sender: TObject);
     225procedure TMainForm.DictionaryStringButtonClick(Sender: TObject);
    224226//type
    225227//  TPairStringString = TGPair<string, string>;
     
    228230begin
    229231  ListViewOutput.Clear;
    230   LabelTestName.Caption := 'TDictionaryString test';
     232  LabelTestName.Caption := 'TGDictionary<string, string> test';
    231233  Dictionary := TGDictionary<string, string>.Create;
    232234  with Dictionary do try
     
    251253end;
    252254
    253 procedure TMainForm.ButtonCharListClick(Sender: TObject);
    254 var
    255   List: TListChar;
    256   List2: TListChar;
    257 begin
    258   ListViewOutput.Clear;
    259   LabelTestName.Caption := 'TListChar test';
    260   List := TListChar.Create;
    261   List2 := TListChar.Create;
     255procedure TMainForm.CharListButtonClick(Sender: TObject);
     256var
     257  List: TGString<Char>;
     258  List2: TGString<Char>;
     259begin
     260  ListViewOutput.Clear;
     261  LabelTestName.Caption := 'TGString<Char> test';
     262  List := TGString<Char>.Create;
     263  List2 := TGString<Char>.Create;
    262264  with List do try
    263265    AddArray([' ', ' ', 'A', 'b', 'c', 'd', ' ']);
     
    293295  SampleCount: Integer = 100000;
    294296begin
    295   LabelTestName.Caption := 'Generic specialized TListString vs. classic non-generic TStringList benchmark';
     297  LabelTestName.Caption := 'Generic specialized TGStringList<string> vs. classic non-generic TStringList benchmark';
    296298  ListViewOutput.Clear;
    297299  try
     
    441443  R: string;
    442444begin
    443   LabelTestName.Caption := 'Generic specialized TDictionaryStringString vs. classic non-generic TStringList benchmark';
     445  LabelTestName.Caption := 'Generic specialized TGDictionary<string,string> vs. classic non-generic TStringList benchmark';
    444446  ListViewOutput.Clear;
    445447  try
     
    537539  SampleCount: Integer = 100000;
    538540begin
    539   LabelTestName.Caption := 'Generic specialized TListObject vs. classic non-generic TFPList benchmark';
     541  LabelTestName.Caption := 'Generic specialized TGObjectList<Object> vs. classic non-generic TFPList benchmark';
    540542  ListViewOutput.Clear;
    541543  try
     
    728730end;
    729731
    730 procedure TMainForm.ButtonStringListClick(Sender: TObject);
     732procedure TMainForm.StringListButtonClick(Sender: TObject);
    731733var
    732734  List: TGList<String>;
    733735begin
    734736  ListViewOutput.Clear;
    735   WriteOutput('TListString test');
     737  WriteOutput('TGList<string> test');
    736738  List := TGList<String>.Create;
    737739  with List do try
     
    759761end;
    760762
     763procedure TMainForm.TreeButtonClick(Sender: TObject);
     764var
     765  Tree: TGTree<string>;
     766  //Tree2: TGTree<string>;
     767  I: Integer;
     768begin
     769  {ListViewOutput.Clear;
     770  LabelTestName.Caption := 'TGTree<string> test';
     771  Tree := TGTree<Integer>.Create;
     772  Tree2 := TGTree<Integer>.Create;
     773  with Tree do try
     774(*    AddArray([10, 20, 30, 40]);
     775    WriteOutput('AddArray([10, 20, 30, 40])', Implode(',', IntToStr));
     776    Clear;
     777    WriteOutput('Clear', Implode(',', IntToStr));
     778    for I := 0 to 10 do Add(I);
     779    WriteOutput('for I := 0 to 10 do Add(I)', Implode(',', IntToStr));
     780    WriteOutput('Count', IntToStr(Count));
     781    Reverse;
     782    WriteOutput('Reverse', Implode(',', IntToStr));
     783    WriteOutput('First', IntToStr(First));
     784    WriteOutput('Last', IntToStr(Last));
     785    MoveItems(3, 2, 3);
     786    WriteOutput('MoveItems(3, 2, 3)', Implode(',', IntToStr));
     787    Insert(5, 11);
     788    WriteOutput('Insert(5, 11)', Implode(',', IntToStr));
     789    DeleteItems(0, 10);
     790    WriteOutput('Delete(0, 10)', Implode(',', IntToStr));
     791    List2.SetArray([1, 0]);
     792    WriteOutput('EqualTo([6, 11])', BoolToStr(EqualTo(List2)));
     793    List2.SetArray([2, 0]);
     794    WriteOutput('EqualTo([7, 11])', BoolToStr(EqualTo(List2)));
     795    InsertCount(0, 3);
     796    WriteOutput('InsertCount(0, 3)', Implode(',', IntToStr));
     797    Fill(0, 3, 9);
     798    WriteOutput('Fill(0, 3, 9)', Implode(',', IntToStr));*)
     799  finally
     800    Free;
     801    Tree2.Free;
     802  end;}
     803end;
     804
    761805procedure TMainForm.UpdateButtonState(Enabled: Boolean);
    762806begin
    763807  ButtonBenchmarkDictionary.Enabled := Enabled;
    764808  ButtonBenchmarkListString.Enabled := Enabled;
    765   ButtonCharList.Enabled := Enabled;
    766   ButtonDictionaryString.Enabled := Enabled;
    767   ButtonIntegerList.Enabled := Enabled;
    768   ButtonListObject.Enabled := Enabled;
    769   ButtonMatrixInteger.Enabled := Enabled;
    770   ButtonQueueInteger.Enabled := Enabled;
    771   ButtonStringList.Enabled := Enabled;
     809  CharListButton.Enabled := Enabled;
     810  DictionaryStringButton.Enabled := Enabled;
     811  IntegerListButton.Enabled := Enabled;
     812  ListObjectButton.Enabled := Enabled;
     813  MatrixIntegerButton.Enabled := Enabled;
     814  QueueIntegerButton.Enabled := Enabled;
     815  StringListButton.Enabled := Enabled;
    772816end;
    773817
  • Generics/NativeGenerics/Units/GenericList.pas

    r324 r326  
    9393  end;
    9494
    95   TListObject<TItem> = class(TGList<TItem>)
     95  TGObjectList<TItem> = class(TGList<TItem>)
    9696  private
    9797    procedure Put(Index: Integer; const AValue: TItem); override;
     
    105105  end;
    106106
    107   TListString<TItem> = class(TGList<TItem>)
     107  TGStringList<TItem> = class(TGList<TItem>)
    108108  private
    109109  public
     
    603603end;
    604604
    605 { TListObject }
    606 
    607 procedure TListObject<TItem>.Assign(Source: TGList<TItem>);
     605{ TGObjectList }
     606
     607procedure TGObjectList<TItem>.Assign(Source: TGList<TItem>);
    608608begin
    609609  Clear;
     
    612612end;
    613613
    614 procedure TListObject<TItem>.Put(Index: Integer; const AValue: TItem);
     614procedure TGObjectList<TItem>.Put(Index: Integer; const AValue: TItem);
    615615begin
    616616  if OwnsObjects then FItems[Index].Free;
     
    618618end;
    619619
    620 procedure TListObject<TItem>.Delete(Index: Integer);
     620procedure TGObjectList<TItem>.Delete(Index: Integer);
    621621begin
    622622  if OwnsObjects then FItems[Index].Free;
     
    624624end;
    625625
    626 procedure TListObject<TItem>.Clear;
     626procedure TGObjectList<TItem>.Clear;
    627627var
    628628  I: Integer;
     
    638638end;
    639639
    640 constructor TListObject<TItem>.Create;
     640constructor TGObjectList<TItem>.Create;
    641641begin
    642642  inherited;
     
    644644end;
    645645
    646 destructor TListObject<TItem>.Destroy;
     646destructor TGObjectList<TItem>.Destroy;
    647647begin
    648648  Clear;
     
    650650end;
    651651
    652 { TListString }
    653 
    654 procedure TListString<TItem>.Assign(Source: TGList<TItem>);
     652{ TGStringList }
     653
     654procedure TGStringList<TItem>.Assign(Source: TGList<TItem>);
    655655begin
    656656  Clear;
     
    658658end;
    659659
    660 procedure TListString<TItem>.Delete(Index: Integer);
     660procedure TGStringList<TItem>.Delete(Index: Integer);
    661661begin
    662662  FItems[Index] := '';
     
    664664end;
    665665
    666 procedure TListString<TItem>.Clear;
     666procedure TGStringList<TItem>.Clear;
    667667var
    668668  I: Integer;
     
    676676end;
    677677
    678 constructor TListString<TItem>.Create;
     678constructor TGStringList<TItem>.Create;
    679679begin
    680680  inherited;
    681681end;
    682682
    683 destructor TListString<TItem>.Destroy;
     683destructor TGStringList<TItem>.Destroy;
    684684begin
    685685  Clear;
  • Generics/NativeGenerics/Units/GenericTree.pas

    r132 r326  
    99
    1010type
    11 //  TGTreeNode<TItem> = class;
    1211
    13 //  TGTreeNodeList = TGList<TGTreeNode>;
     12  { TGAbstractTreeNode }
    1413
    15   TGTreeNode<TItem> = class
    16 //    Childs: ;
    17     Value: TItem;
    18     procedure Clear;
     14  TGAbstractTreeNode<TItem> = class
     15  private
     16    function GetValue: TItem; virtual; abstract;
     17    procedure SetValue(AValue: TItem); virtual; abstract;
     18  public
     19    type
     20      TNode = TGAbstractTreeNode<TItem>;
     21  var
     22    Childs: TGAbstractList<TNode>;
     23    procedure Clear; virtual; abstract;
     24    constructor Create; virtual;
     25    destructor Destroy; override;
     26    property Value: TItem read GetValue write SetValue;
     27  end;
     28
     29  { TGAbstractTree }
     30
     31  TGAbstractTree<TItem> = class
     32  public
     33    type
     34      TNode = TGAbstractTreeNode<TItem>;
     35      TIndex = NativeInt;
     36  private
     37    function GetItem(Index: TIndex): TItem;
     38    procedure SetItem(Index: TIndex; AValue: TItem);
     39  var
     40    TopItem: TGAbstractTreeNode<TItem>;
     41    procedure Clear; virtual; abstract;
     42    constructor Create; virtual;
     43    property Items[Index: TIndex]: TItem read GetItem write SetItem;
     44  end;
     45
     46
     47  TGTreeNode<TItem> = class(TGAbstractTreeNode<TItem>)
     48  public
     49    type
     50      TNode = TGTreeNode<TItem>;
     51  private
     52    FValue: TItem;
     53    function GetValue: TItem; override;
     54    procedure SetValue(AValue: TItem); override;
     55  public
     56    procedure Clear; override;
     57    constructor Create; override;
     58    destructor Destroy; override;
    1959  end;
    2060
    2161  TGTree<TItem> = class
    22   //  TopItem: TGTreeNode;
    23     procedure Clear;
     62  public
     63    type
     64      TNode = TGTreeNode<TItem>;
     65  private
     66    FItems: TGList<TNode>;
     67  public
     68    procedure Clear; override;
     69    constructor Create; override;
     70    destructor Destroy; override;
    2471  end;
     72
    2573
    2674implementation
    2775
    2876{ TGTreeNode }
     77
     78function TGTreeNode<TItem>.GetValue: TItem;
     79begin
     80  Result := FValue;
     81end;
     82
     83procedure TGTreeNode<TItem>.SetValue(AValue: TItem);
     84begin
     85  FValue := AValue;
     86end;
    2987
    3088procedure TGTreeNode<TItem>.Clear;
     
    4098end;
    4199
     100constructor TGTree<TItem>.Create;
     101begin
     102  inherited;
     103  FItems := TGList<TNode>.Create;
     104end;
     105
     106destructor TGTree<TItem>.Destroy;
     107begin
     108  inherited Destroy;
     109  FItems.Free;
     110end;
     111
     112{ TGAbstractTree<TItem> }
     113
     114function TGAbstractTree<TItem>.GetItem(Index: TIndex): TItem;
     115begin
     116
     117end;
     118
     119procedure TGAbstractTree<TItem>.SetItem(Index: TIndex; AValue: TItem);
     120begin
     121
     122end;
     123
     124constructor TGAbstractTree<TItem>.Create;
     125begin
     126end;
     127
     128constructor TGTreeNode<TItem>.Create;
     129begin
     130  inherited;
     131  Childs := TGList<TNode>.Create;
     132end;
     133
     134destructor TGTreeNode<TItem>.Destroy;
     135begin
     136  Childs.Free;
     137  inherited;
     138end;
     139
     140{ TGAbstractTreeNode<TItem> }
     141
     142constructor TGAbstractTreeNode<TItem>.Create;
     143begin
     144end;
     145
     146destructor TGAbstractTreeNode<TItem>.Destroy;
     147begin
     148  inherited Destroy;
     149end;
     150
     151
    42152end.
Note: See TracChangeset for help on using the changeset viewer.