Changeset 109 for Generics


Ignore:
Timestamp:
Jan 3, 2011, 7:22:47 AM (13 years ago)
Author:
george
Message:
  • Added: TGMatrix implode.
Location:
Generics/TemplateGenerics
Files:
7 edited

Legend:

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

    r108 r109  
    3838      </Item2>
    3939    </RequiredPackages>
    40     <Units Count="57">
     40    <Units Count="59">
    4141      <Unit0>
    4242        <Filename Value="Demo.lpr"/>
     
    5858        <EditorIndex Value="0"/>
    5959        <WindowIndex Value="0"/>
    60         <TopLine Value="192"/>
    61         <CursorPos X="1" Y="213"/>
     60        <TopLine Value="73"/>
     61        <CursorPos X="53" Y="79"/>
    6262        <UsageCount Value="233"/>
     63        <Bookmarks Count="1">
     64          <Item0 X="65" Y="221" ID="2"/>
     65        </Bookmarks>
    6366        <Loaded Value="True"/>
    6467        <LoadedDesigner Value="True"/>
     
    7174        <TopLine Value="1"/>
    7275        <CursorPos X="1" Y="11"/>
    73         <UsageCount Value="6"/>
     76        <UsageCount Value="4"/>
    7477      </Unit2>
    7578      <Unit3>
     
    7982        <TopLine Value="3"/>
    8083        <CursorPos X="43" Y="13"/>
    81         <UsageCount Value="6"/>
     84        <UsageCount Value="4"/>
    8285      </Unit3>
    8386      <Unit4>
     
    8790        <TopLine Value="33"/>
    8891        <CursorPos X="12" Y="56"/>
    89         <UsageCount Value="6"/>
     92        <UsageCount Value="4"/>
    9093      </Unit4>
    9194      <Unit5>
     
    9598        <TopLine Value="1"/>
    9699        <CursorPos X="23" Y="21"/>
    97         <UsageCount Value="6"/>
     100        <UsageCount Value="4"/>
    98101      </Unit5>
    99102      <Unit6>
     
    103106        <TopLine Value="1"/>
    104107        <CursorPos X="23" Y="24"/>
    105         <UsageCount Value="6"/>
     108        <UsageCount Value="4"/>
    106109      </Unit6>
    107110      <Unit7>
     
    111114        <TopLine Value="1"/>
    112115        <CursorPos X="23" Y="13"/>
    113         <UsageCount Value="6"/>
     116        <UsageCount Value="4"/>
    114117      </Unit7>
    115118      <Unit8>
     
    119122        <TopLine Value="1"/>
    120123        <CursorPos X="23" Y="24"/>
    121         <UsageCount Value="6"/>
     124        <UsageCount Value="4"/>
    122125      </Unit8>
    123126      <Unit9>
     
    127130        <TopLine Value="1"/>
    128131        <CursorPos X="31" Y="13"/>
    129         <UsageCount Value="6"/>
     132        <UsageCount Value="4"/>
    130133      </Unit9>
    131134      <Unit10>
     
    135138        <TopLine Value="1"/>
    136139        <CursorPos X="29" Y="17"/>
    137         <UsageCount Value="6"/>
     140        <UsageCount Value="4"/>
    138141      </Unit10>
    139142      <Unit11>
     
    142145        <TopLine Value="1"/>
    143146        <CursorPos X="1" Y="4"/>
    144         <UsageCount Value="6"/>
     147        <UsageCount Value="4"/>
    145148        <DefaultSyntaxHighlighter Value="None"/>
    146149      </Unit11>
     
    150153        <TopLine Value="1"/>
    151154        <CursorPos X="21" Y="6"/>
    152         <UsageCount Value="6"/>
     155        <UsageCount Value="4"/>
    153156        <DefaultSyntaxHighlighter Value="None"/>
    154157      </Unit12>
     
    158161        <TopLine Value="1"/>
    159162        <CursorPos X="1" Y="1"/>
    160         <UsageCount Value="6"/>
     163        <UsageCount Value="4"/>
    161164        <DefaultSyntaxHighlighter Value="None"/>
    162165      </Unit13>
     
    166169        <TopLine Value="1"/>
    167170        <CursorPos X="25" Y="13"/>
    168         <UsageCount Value="7"/>
     171        <UsageCount Value="5"/>
    169172        <DefaultSyntaxHighlighter Value="None"/>
    170173      </Unit14>
     
    174177        <TopLine Value="4"/>
    175178        <CursorPos X="3" Y="6"/>
    176         <UsageCount Value="6"/>
     179        <UsageCount Value="4"/>
    177180        <DefaultSyntaxHighlighter Value="None"/>
    178181      </Unit15>
     
    182185        <TopLine Value="1"/>
    183186        <CursorPos X="14" Y="16"/>
    184         <UsageCount Value="6"/>
     187        <UsageCount Value="4"/>
    185188        <DefaultSyntaxHighlighter Value="None"/>
    186189      </Unit16>
     
    191194        <TopLine Value="1"/>
    192195        <CursorPos X="32" Y="18"/>
    193         <UsageCount Value="6"/>
     196        <UsageCount Value="4"/>
    194197      </Unit17>
    195198      <Unit18>
     
    198201        <TopLine Value="1"/>
    199202        <CursorPos X="20" Y="12"/>
    200         <UsageCount Value="4"/>
     203        <UsageCount Value="2"/>
    201204        <DefaultSyntaxHighlighter Value="None"/>
    202205      </Unit18>
     
    207210        <TopLine Value="1"/>
    208211        <CursorPos X="1" Y="22"/>
    209         <UsageCount Value="4"/>
     212        <UsageCount Value="2"/>
    210213      </Unit19>
    211214      <Unit20>
     
    214217        <TopLine Value="1"/>
    215218        <CursorPos X="1" Y="1"/>
    216         <UsageCount Value="4"/>
     219        <UsageCount Value="2"/>
    217220        <DefaultSyntaxHighlighter Value="None"/>
    218221      </Unit20>
     
    222225        <TopLine Value="1"/>
    223226        <CursorPos X="1" Y="3"/>
    224         <UsageCount Value="4"/>
     227        <UsageCount Value="2"/>
    225228        <DefaultSyntaxHighlighter Value="None"/>
    226229      </Unit21>
     
    230233        <TopLine Value="1"/>
    231234        <CursorPos X="1" Y="3"/>
    232         <UsageCount Value="4"/>
     235        <UsageCount Value="2"/>
    233236        <DefaultSyntaxHighlighter Value="None"/>
    234237      </Unit22>
     
    239242        <TopLine Value="45"/>
    240243        <CursorPos X="9" Y="79"/>
    241         <UsageCount Value="3"/>
     244        <UsageCount Value="1"/>
    242245      </Unit23>
    243246      <Unit24>
     
    246249        <TopLine Value="1"/>
    247250        <CursorPos X="21" Y="4"/>
    248         <UsageCount Value="8"/>
     251        <UsageCount Value="6"/>
    249252        <DefaultSyntaxHighlighter Value="None"/>
    250253      </Unit24>
     
    255258        <TopLine Value="1"/>
    256259        <CursorPos X="1" Y="25"/>
    257         <UsageCount Value="8"/>
     260        <UsageCount Value="6"/>
    258261      </Unit25>
    259262      <Unit26>
     
    262265        <TopLine Value="1"/>
    263266        <CursorPos X="1" Y="3"/>
    264         <UsageCount Value="8"/>
     267        <UsageCount Value="6"/>
    265268        <DefaultSyntaxHighlighter Value="None"/>
    266269      </Unit26>
     
    270273        <TopLine Value="1"/>
    271274        <CursorPos X="7" Y="4"/>
    272         <UsageCount Value="8"/>
     275        <UsageCount Value="6"/>
    273276        <DefaultSyntaxHighlighter Value="None"/>
    274277      </Unit27>
     
    279282        <TopLine Value="1"/>
    280283        <CursorPos X="14" Y="15"/>
    281         <UsageCount Value="8"/>
     284        <UsageCount Value="6"/>
    282285      </Unit28>
    283286      <Unit29>
     
    286289        <TopLine Value="1"/>
    287290        <CursorPos X="14" Y="18"/>
    288         <UsageCount Value="8"/>
     291        <UsageCount Value="6"/>
    289292        <DefaultSyntaxHighlighter Value="None"/>
    290293      </Unit29>
     
    295298        <TopLine Value="2"/>
    296299        <CursorPos X="30" Y="8"/>
    297         <UsageCount Value="8"/>
     300        <UsageCount Value="6"/>
    298301      </Unit30>
    299302      <Unit31>
     
    303306        <TopLine Value="13"/>
    304307        <CursorPos X="15" Y="12"/>
    305         <UsageCount Value="10"/>
     308        <UsageCount Value="8"/>
    306309        <DefaultSyntaxHighlighter Value="Delphi"/>
    307310      </Unit31>
     
    310313        <EditorIndex Value="6"/>
    311314        <WindowIndex Value="0"/>
    312         <TopLine Value="3"/>
    313         <CursorPos X="1" Y="13"/>
     315        <TopLine Value="170"/>
     316        <CursorPos X="82" Y="183"/>
    314317        <UsageCount Value="107"/>
    315318        <Loaded Value="True"/>
     
    320323        <TopLine Value="31"/>
    321324        <CursorPos X="44" Y="47"/>
    322         <UsageCount Value="96"/>
     325        <UsageCount Value="94"/>
    323326      </Unit33>
    324327      <Unit34>
     
    327330        <TopLine Value="1"/>
    328331        <CursorPos X="36" Y="48"/>
    329         <UsageCount Value="96"/>
     332        <UsageCount Value="94"/>
    330333      </Unit34>
    331334      <Unit35>
     
    334337        <TopLine Value="3"/>
    335338        <CursorPos X="1" Y="3"/>
    336         <UsageCount Value="96"/>
     339        <UsageCount Value="94"/>
    337340      </Unit35>
    338341      <Unit36>
     
    341344        <TopLine Value="11"/>
    342345        <CursorPos X="42" Y="11"/>
    343         <UsageCount Value="96"/>
     346        <UsageCount Value="94"/>
    344347      </Unit36>
    345348      <Unit37>
     
    348351        <TopLine Value="3"/>
    349352        <CursorPos X="1" Y="3"/>
    350         <UsageCount Value="96"/>
     353        <UsageCount Value="94"/>
    351354      </Unit37>
    352355      <Unit38>
     
    355358        <TopLine Value="1"/>
    356359        <CursorPos X="22" Y="30"/>
    357         <UsageCount Value="96"/>
     360        <UsageCount Value="94"/>
    358361      </Unit38>
    359362      <Unit39>
     
    363366        <TopLine Value="6"/>
    364367        <CursorPos X="56" Y="36"/>
    365         <UsageCount Value="95"/>
     368        <UsageCount Value="93"/>
    366369      </Unit39>
    367370      <Unit40>
     
    371374        <TopLine Value="27"/>
    372375        <CursorPos X="50" Y="59"/>
    373         <UsageCount Value="94"/>
     376        <UsageCount Value="92"/>
    374377      </Unit40>
    375378      <Unit41>
     
    379382        <TopLine Value="57"/>
    380383        <CursorPos X="48" Y="85"/>
    381         <UsageCount Value="94"/>
     384        <UsageCount Value="92"/>
    382385      </Unit41>
    383386      <Unit42>
     
    386389        <TopLine Value="1"/>
    387390        <CursorPos X="33" Y="14"/>
    388         <UsageCount Value="94"/>
     391        <UsageCount Value="92"/>
    389392      </Unit42>
    390393      <Unit43>
     
    394397        <TopLine Value="52"/>
    395398        <CursorPos X="1" Y="81"/>
    396         <UsageCount Value="94"/>
     399        <UsageCount Value="92"/>
    397400      </Unit43>
    398401      <Unit44>
     
    402405        <TopLine Value="29"/>
    403406        <CursorPos X="1" Y="62"/>
    404         <UsageCount Value="94"/>
     407        <UsageCount Value="92"/>
    405408      </Unit44>
    406409      <Unit45>
     
    410413        <TopLine Value="9"/>
    411414        <CursorPos X="60" Y="36"/>
    412         <UsageCount Value="93"/>
     415        <UsageCount Value="91"/>
    413416      </Unit45>
    414417      <Unit46>
     
    417420        <EditorIndex Value="7"/>
    418421        <WindowIndex Value="0"/>
    419         <TopLine Value="1"/>
    420         <CursorPos X="1" Y="104"/>
    421         <UsageCount Value="103"/>
     422        <TopLine Value="161"/>
     423        <CursorPos X="17" Y="287"/>
     424        <UsageCount Value="102"/>
    422425        <Loaded Value="True"/>
    423426      </Unit46>
    424427      <Unit47>
    425428        <Filename Value="../Generic/GenericMatrix.inc"/>
    426         <EditorIndex Value="9"/>
    427         <WindowIndex Value="0"/>
    428         <TopLine Value="1"/>
    429         <CursorPos X="33" Y="10"/>
     429        <EditorIndex Value="8"/>
     430        <WindowIndex Value="0"/>
     431        <TopLine Value="311"/>
     432        <CursorPos X="48" Y="331"/>
    430433        <UsageCount Value="103"/>
    431434        <Loaded Value="True"/>
     
    437440        <TopLine Value="2624"/>
    438441        <CursorPos X="37" Y="2636"/>
    439         <UsageCount Value="92"/>
     442        <UsageCount Value="90"/>
    440443      </Unit48>
    441444      <Unit49>
     
    444447        <TopLine Value="94"/>
    445448        <CursorPos X="1" Y="1"/>
    446         <UsageCount Value="8"/>
     449        <UsageCount Value="6"/>
    447450        <DefaultSyntaxHighlighter Value="XML"/>
    448451      </Unit49>
     
    451454        <EditorIndex Value="2"/>
    452455        <WindowIndex Value="0"/>
    453         <TopLine Value="32"/>
    454         <CursorPos X="11" Y="36"/>
    455         <UsageCount Value="20"/>
     456        <TopLine Value="199"/>
     457        <CursorPos X="14" Y="213"/>
     458        <UsageCount Value="28"/>
    456459        <Loaded Value="True"/>
    457460      </Unit50>
     
    460463        <EditorIndex Value="5"/>
    461464        <WindowIndex Value="0"/>
    462         <TopLine Value="462"/>
    463         <CursorPos X="25" Y="464"/>
    464         <UsageCount Value="20"/>
     465        <TopLine Value="199"/>
     466        <CursorPos X="3" Y="201"/>
     467        <UsageCount Value="28"/>
    465468        <Loaded Value="True"/>
    466469      </Unit51>
    467470      <Unit52>
    468471        <Filename Value="../Generic/GenericListObject.inc"/>
    469         <EditorIndex Value="8"/>
    470472        <WindowIndex Value="0"/>
    471473        <TopLine Value="1"/>
    472474        <CursorPos X="21" Y="20"/>
    473         <UsageCount Value="20"/>
    474         <Loaded Value="True"/>
     475        <UsageCount Value="19"/>
    475476      </Unit52>
    476477      <Unit53>
     
    481482        <TopLine Value="1"/>
    482483        <CursorPos X="27" Y="26"/>
    483         <UsageCount Value="20"/>
     484        <UsageCount Value="28"/>
    484485        <Loaded Value="True"/>
    485486      </Unit53>
     
    490491        <TopLine Value="381"/>
    491492        <CursorPos X="3" Y="398"/>
    492         <UsageCount Value="20"/>
     493        <UsageCount Value="28"/>
    493494        <Loaded Value="True"/>
    494495      </Unit54>
     
    498499        <TopLine Value="475"/>
    499500        <CursorPos X="10" Y="503"/>
    500         <UsageCount Value="8"/>
     501        <UsageCount Value="7"/>
    501502      </Unit55>
    502503      <Unit56>
     
    506507        <TopLine Value="2270"/>
    507508        <CursorPos X="22" Y="2273"/>
    508         <UsageCount Value="11"/>
     509        <UsageCount Value="19"/>
    509510        <Loaded Value="True"/>
    510511      </Unit56>
     512      <Unit57>
     513        <Filename Value="../Specialized/SpecializedMatrix.pas"/>
     514        <UnitName Value="SpecializedMatrix"/>
     515        <EditorIndex Value="9"/>
     516        <WindowIndex Value="0"/>
     517        <TopLine Value="31"/>
     518        <CursorPos X="38" Y="62"/>
     519        <UsageCount Value="18"/>
     520        <Loaded Value="True"/>
     521      </Unit57>
     522      <Unit58>
     523        <Filename Value="../ReadMe.txt"/>
     524        <WindowIndex Value="0"/>
     525        <TopLine Value="1"/>
     526        <CursorPos X="28" Y="10"/>
     527        <UsageCount Value="9"/>
     528        <DefaultSyntaxHighlighter Value="None"/>
     529      </Unit58>
    511530    </Units>
    512531    <JumpHistory Count="30" HistoryIndex="29">
    513532      <Position1>
    514         <Filename Value="UMainForm.pas"/>
    515         <Caret Line="512" Column="30" TopLine="479"/>
     533        <Filename Value="../Generic/GenericMatrix.inc"/>
     534        <Caret Line="416" Column="1" TopLine="388"/>
    516535      </Position1>
    517536      <Position2>
    518         <Filename Value="UMainForm.pas"/>
    519         <Caret Line="506" Column="49" TopLine="482"/>
     537        <Filename Value="../Generic/GenericMatrix.inc"/>
     538        <Caret Line="417" Column="1" TopLine="389"/>
    520539      </Position2>
    521540      <Position3>
    522         <Filename Value="UMainForm.pas"/>
    523         <Caret Line="41" Column="43" TopLine="40"/>
     541        <Filename Value="../Generic/GenericMatrix.inc"/>
     542        <Caret Line="408" Column="1" TopLine="389"/>
    524543      </Position3>
    525544      <Position4>
    526         <Filename Value="UMainForm.pas"/>
    527         <Caret Line="63" Column="9" TopLine="46"/>
     545        <Filename Value="../Generic/GenericMatrix.inc"/>
     546        <Caret Line="409" Column="1" TopLine="389"/>
    528547      </Position4>
    529548      <Position5>
    530         <Filename Value="UMainForm.pas"/>
    531         <Caret Line="41" Column="55" TopLine="24"/>
     549        <Filename Value="../Generic/GenericMatrix.inc"/>
     550        <Caret Line="410" Column="1" TopLine="389"/>
    532551      </Position5>
    533552      <Position6>
    534         <Filename Value="UMainForm.pas"/>
    535         <Caret Line="506" Column="61" TopLine="483"/>
     553        <Filename Value="../Generic/GenericMatrix.inc"/>
     554        <Caret Line="411" Column="1" TopLine="389"/>
    536555      </Position6>
    537556      <Position7>
    538         <Filename Value="UMainForm.pas"/>
    539         <Caret Line="63" Column="8" TopLine="46"/>
     557        <Filename Value="../Generic/GenericMatrix.inc"/>
     558        <Caret Line="412" Column="1" TopLine="389"/>
    540559      </Position7>
    541560      <Position8>
    542         <Filename Value="UMainForm.pas"/>
    543         <Caret Line="41" Column="15" TopLine="1"/>
     561        <Filename Value="../Generic/GenericMatrix.inc"/>
     562        <Caret Line="413" Column="1" TopLine="389"/>
    544563      </Position8>
    545564      <Position9>
    546         <Filename Value="UMainForm.pas"/>
    547         <Caret Line="66" Column="9" TopLine="49"/>
     565        <Filename Value="../Generic/GenericMatrix.inc"/>
     566        <Caret Line="410" Column="1" TopLine="389"/>
    548567      </Position9>
    549568      <Position10>
    550         <Filename Value="UMainForm.pas"/>
    551         <Caret Line="41" Column="15" TopLine="1"/>
     569        <Filename Value="../Generic/GenericMatrix.inc"/>
     570        <Caret Line="411" Column="1" TopLine="389"/>
    552571      </Position10>
    553572      <Position11>
    554         <Filename Value="UMainForm.pas"/>
    555         <Caret Line="63" Column="31" TopLine="46"/>
     573        <Filename Value="../Generic/GenericMatrix.inc"/>
     574        <Caret Line="413" Column="1" TopLine="389"/>
    556575      </Position11>
    557576      <Position12>
    558         <Filename Value="UMainForm.pas"/>
    559         <Caret Line="3" Column="19" TopLine="1"/>
     577        <Filename Value="../Generic/GenericMatrix.inc"/>
     578        <Caret Line="415" Column="1" TopLine="389"/>
    560579      </Position12>
    561580      <Position13>
    562         <Filename Value="UMainForm.pas"/>
    563         <Caret Line="63" Column="9" TopLine="46"/>
     581        <Filename Value="../Generic/GenericMatrix.inc"/>
     582        <Caret Line="417" Column="1" TopLine="389"/>
    564583      </Position13>
    565584      <Position14>
    566585        <Filename Value="UMainForm.pas"/>
    567         <Caret Line="41" Column="26" TopLine="24"/>
     586        <Caret Line="104" Column="13" TopLine="74"/>
    568587      </Position14>
    569588      <Position15>
    570589        <Filename Value="UMainForm.pas"/>
    571         <Caret Line="63" Column="10" TopLine="46"/>
     590        <Caret Line="102" Column="7" TopLine="85"/>
    572591      </Position15>
    573592      <Position16>
    574593        <Filename Value="UMainForm.pas"/>
    575         <Caret Line="41" Column="47" TopLine="24"/>
     594        <Caret Line="221" Column="64" TopLine="195"/>
    576595      </Position16>
    577596      <Position17>
    578597        <Filename Value="UMainForm.pas"/>
    579         <Caret Line="506" Column="53" TopLine="483"/>
     598        <Caret Line="220" Column="49" TopLine="203"/>
    580599      </Position17>
    581600      <Position18>
    582601        <Filename Value="UMainForm.pas"/>
    583         <Caret Line="63" Column="43" TopLine="46"/>
     602        <Caret Line="88" Column="16" TopLine="71"/>
    584603      </Position18>
    585604      <Position19>
    586605        <Filename Value="UMainForm.pas"/>
    587         <Caret Line="61" Column="17" TopLine="46"/>
     606        <Caret Line="87" Column="1" TopLine="71"/>
    588607      </Position19>
    589608      <Position20>
    590609        <Filename Value="UMainForm.pas"/>
    591         <Caret Line="64" Column="17" TopLine="47"/>
     610        <Caret Line="217" Column="57" TopLine="200"/>
    592611      </Position20>
    593612      <Position21>
    594613        <Filename Value="UMainForm.pas"/>
    595         <Caret Line="50" Column="49" TopLine="31"/>
     614        <Caret Line="218" Column="55" TopLine="201"/>
    596615      </Position21>
    597616      <Position22>
    598617        <Filename Value="UMainForm.pas"/>
    599         <Caret Line="61" Column="17" TopLine="47"/>
     618        <Caret Line="221" Column="69" TopLine="191"/>
    600619      </Position22>
    601620      <Position23>
    602621        <Filename Value="UMainForm.pas"/>
    603         <Caret Line="64" Column="11" TopLine="47"/>
     622        <Caret Line="359" Column="19" TopLine="350"/>
    604623      </Position23>
    605624      <Position24>
    606         <Filename Value="UMainForm.pas"/>
    607         <Caret Line="63" Column="34" TopLine="41"/>
     625        <Filename Value="/usr/share/fpcsrc/rtl/objpas/classes/lists.inc"/>
     626        <Caret Line="679" Column="23" TopLine="677"/>
    608627      </Position24>
    609628      <Position25>
    610         <Filename Value="UMainForm.pas"/>
    611         <Caret Line="432" Column="14" TopLine="415"/>
     629        <Filename Value="../Generic/GenericList.inc"/>
     630        <Caret Line="193" Column="31" TopLine="180"/>
    612631      </Position25>
    613632      <Position26>
    614         <Filename Value="UMainForm.pas"/>
    615         <Caret Line="41" Column="34" TopLine="24"/>
     633        <Filename Value="../Specialized/SpecializedList.pas"/>
     634        <Caret Line="104" Column="1" TopLine="1"/>
    616635      </Position26>
    617636      <Position27>
    618         <Filename Value="UMainForm.pas"/>
    619         <Caret Line="506" Column="40" TopLine="483"/>
     637        <Filename Value="../Specialized/SpecializedList.pas"/>
     638        <Caret Line="296" Column="1" TopLine="269"/>
    620639      </Position27>
    621640      <Position28>
    622         <Filename Value="UMainForm.pas"/>
    623         <Caret Line="41" Column="46" TopLine="24"/>
     641        <Filename Value="../Generic/GenericList.inc"/>
     642        <Caret Line="184" Column="20" TopLine="170"/>
    624643      </Position28>
    625644      <Position29>
    626         <Filename Value="UMainForm.pas"/>
    627         <Caret Line="506" Column="47" TopLine="483"/>
     645        <Filename Value="../Specialized/SpecializedList.pas"/>
     646        <Caret Line="296" Column="1" TopLine="269"/>
    628647      </Position29>
    629648      <Position30>
    630         <Filename Value="UMainForm.pas"/>
    631         <Caret Line="142" Column="38" TopLine="114"/>
     649        <Filename Value="../Generic/GenericList.inc"/>
     650        <Caret Line="184" Column="19" TopLine="170"/>
    632651      </Position30>
    633652    </JumpHistory>
  • Generics/TemplateGenerics/Demo/UMainForm.lfm

    r108 r109  
    9696  object ListViewOutput: TListView
    9797    Left = 144
    98     Height = 507
    99     Top = 8
     98    Height = 491
     99    Top = 24
    100100    Width = 542
    101101    Anchors = [akTop, akLeft, akRight, akBottom]
     
    113113    ViewStyle = vsReport
    114114  end
     115  object LabelTestName: TLabel
     116    Left = 144
     117    Height = 14
     118    Top = 8
     119    Width = 10
     120    Caption = '   '
     121    ParentColor = False
     122  end
    115123end
  • Generics/TemplateGenerics/Demo/UMainForm.pas

    r108 r109  
    2424    ButtonIntegerList: TButton;
    2525    ButtonStringList: TButton;
     26    LabelTestName: TLabel;
    2627    ListViewOutput: TListView;
    2728    procedure ButtonBenchmarkDictionaryClick(Sender: TObject);
     
    6162begin
    6263  ListViewOutput.Clear;
    63   WriteOutput('TListInteger test');
     64  LabelTestName.Caption := 'TListInteger test';
    6465  List := TListInteger.Create;
    6566  with List do try
     
    9091begin
    9192  ListViewOutput.Clear;
    92   WriteOutput('TListInteger test');
     93  LabelTestName.Caption := 'TMatrixInteger test';
    9394  Matrix := TMatrixInteger.Create;
    9495  with Matrix do try
    95     WriteOutput('AddMatrix([10, 20, 30, 40])');
    96     //AddMatrix([10, 20, 30, 40]);
    97     WriteOutput('Implode: ' + Implode(',', IntToStr));
     96    Count := CreateIndex(2, 2);
     97    WriteOutput('Count := CreateIndex(2, 2)', '[' + Implode('; ', ', ', IntToStr) + ']');
     98    Fill(CreateIndex(0, 0), Count, 1);
     99    WriteOutput('Fill(1)', '[' + Implode('; ', ', ', IntToStr) + ']');
     100    Count := CreateIndex(3, 3);
     101    WriteOutput('Count := CreateIndex(3, 3)', '[' + Implode('; ', ', ', IntToStr) + ']');
     102    WriteOutput('Count [Y, X]', IntToStr(Count.Y) + ', ' + IntToStr(Count.X));
    98103    Clear;
    99     for I := 0 to 10 do Add(I);
    100     WriteOutput('Implode: ' + Implode(',', IntToStr));
    101     WriteOutput('Count: Y: ' + IntToStr(Count.Y) + ', ' + IntToStr(Count.X));
    102     WriteOutput('Implode: ' + Implode(',', IntToStr));
    103     WriteOutput('Reverse');
    104     Reverse;
    105     WriteOutput('Implode: ' + Implode(',', IntToStr));
    106     WriteOutput('First: ' + IntToStr(First));
    107     WriteOutput('Last: ' + IntToStr(Last));
    108     //MoveItems(3, 2, 3);
    109     WriteOutput('Implode: ' + Implode(',', IntToStr));
    110     WriteOutput('Insert(5, 11)');
    111     //Insert(5, 11);
    112     WriteOutput('Implode: ' + Implode(',', IntToStr));
     104    WriteOutput('Clear', '[' + Implode('; ', ', ', IntToStr) + ']');
     105    WriteOutput('Count [Y, X]', IntToStr(Count.Y) + ', ' + IntToStr(Count.X));
    113106  finally
    114107    Free;
     
    127120begin
    128121  ListViewOutput.Clear;
    129   WriteOutput('TListObject test');
     122  LabelTestName.Caption := 'TListObject test';
    130123  List := TListObject.Create;
    131124  with List do try
     
    152145begin
    153146  ListViewOutput.Clear;
    154   WriteOutput('TQueueInteger test');
     147  LabelTestName.Caption := 'TQueueInteger test';
    155148  Queue := TQueueInteger.Create;
    156149  with Queue do try
     
    178171begin
    179172  ListViewOutput.Clear;
    180   WriteOutput('TDictionaryString test');
     173  LabelTestName.Caption := 'TDictionaryString test';
    181174  Dictionary := TDictionaryStringString.Create;
    182175  with Dictionary do try
     
    204197var
    205198  List: TListChar;
    206 begin
    207   ListViewOutput.Clear;
    208   WriteOutput('TListChar test');
     199  List2: TListChar;
     200begin
     201  ListViewOutput.Clear;
     202  LabelTestName.Caption := 'TListChar test';
    209203  List := TListChar.Create;
     204  List2 := TListChar.Create;
    210205  with List do try
    211206    AddArray([' ', ' ', 'A', 'b', 'c', 'd', ' ']);
     
    222217    LowerCase;
    223218    WriteOutput('LowerCase', '''' + Implode('', CharToStr) + '''');
    224   finally
     219    WriteOutput('IndexOf(''c'')', IntToStr(IndexOf('c')));
     220    List2.AddArray(['c', 'b']);
     221    WriteOutput('IndexOfList(''cb'')', IntToStr(IndexOfList(List2)));
     222  finally
     223    List2.Free;
    225224    Free;
    226225  end;
     
    234233  I: Integer;
    235234begin
     235  LabelTestName.Caption := 'Generic specialized TListObject vs. classic non-generic TList benchmark';
    236236  ListViewOutput.Clear;
    237237  try
     
    377377  R: string;
    378378begin
     379  LabelTestName.Caption := 'Generic specialized TDictionaryStringString vs. classic non-generic TStringList benchmark';
    379380  ListViewOutput.Clear;
    380381  try
  • Generics/TemplateGenerics/Generic/GenericList.inc

    r107 r109  
    181181begin
    182182  Result := Start;
     183  // Use slower CompareMem instead of (FItems[Result] <> Item) to support records
    183184  while (Result < FCount) and
    184185  not CompareMem(Addr(FItems[Result]), Addr(Item), SizeOf(TGListItem)) do
  • Generics/TemplateGenerics/Generic/GenericMatrix.inc

    r107 r109  
    66  TGMatrixToStringConverter = function(Item: TGMatrixItem): string;
    77  TGMatrixFromStringConverter = function(Text: string): TGMatrixItem;
     8  TGMatrixRow = array of TGMatrixItem;
    89
    910  TGMatrixIndex = record
     
    2829  public
    2930    function Add(Item: TGMatrixItem): TGMatrixIndex;
    30     procedure AddArray(Values: array of TGMatrixItem);
     31    procedure AddMatrix(Values: array of TGMatrixRow);
    3132    procedure AddList(List: TGMatrix);
    3233    procedure Assign(Source: TGMatrix);
     
    4243    property First: TGMatrixItem read GetFirst write SetFirst;
    4344    procedure Fill(Start, Count: TGMatrixIndex; Value: TGMatrixItem);
    44     function Implode(Separator: string; Converter: TGMatrixToStringConverter): string;
     45    function Implode(RowSeparator, ColSeparator: string; Converter: TGMatrixToStringConverter): string;
    4546    procedure Explode(Text, Separator: string; Converter: TGMatrixFromStringConverter; SlicesCount: Integer = -1);
    4647    function IndexOf(Item: TGMatrixItem; Start: TGMatrixIndex = 0): TGMatrixIndex;
     
    363364end;
    364365
    365 procedure TGMatrix.AddArray(Values: array of TGMatrixItem);
     366procedure TGMatrix.AddMatrix(Values: array of TGMatrixRow);
    366367var
    367368  I: TGMatrixIndex;
     
    397398end;
    398399
    399 function TGMatrix.Implode(Separator: string; Converter: TGMatrixToStringConverter): string;
    400 var
    401   I: TGMatrixIndex;
    402 begin
    403 (*  Result := '';
    404   I := 0;
    405   while I < Count do begin
    406     Result := Result + Converter(Items[I]);
    407     if I < (Count - 1) then
    408       Result := Result + Separator;
    409     I := I + 1;
    410   end; *)
     400function TGMatrix.Implode(RowSeparator, ColSeparator: string; Converter: TGMatrixToStringConverter): string;
     401var
     402  Y: TGMatrixIndexY;
     403  X: TGMatrixIndexX;
     404begin
     405  Result := '';
     406  Y := 0;
     407  while Y < Count.Y do begin
     408    X := 0;
     409    while X < Count.X do begin
     410      Result := Result + Converter(Items[Y, X]);
     411      if X < (Count.X - 1) then
     412        Result := Result + ColSeparator;
     413      X := X + 1;
     414    end;
     415    if Y < (Count.Y - 1) then
     416      Result := Result + RowSeparator;
     417    Y := Y + 1;
     418  end;
    411419end;
    412420
  • Generics/TemplateGenerics/ReadMe.txt

    r82 r109  
    55  http://wiki.freepascal.org/Templates
    66
    7 Version: 0.1
    8 Release date: 2010-10-28
     7Version: 0.3
     8Release date: 2011-01-01
    99Author: Chronos
    1010Email: robie@centrum.cz
     11
  • Generics/TemplateGenerics/Specialized/SpecializedMatrix.pas

    r107 r109  
    1616{$DEFINE TGMatrixItem := Integer}
    1717{$DEFINE TGMatrixIndex := TMatrixIntegerIndex}
     18{$DEFINE TGMatrixRow := TMatrixIntegerRow}
    1819{$DEFINE TGMatrix := TMatrixInteger}
    1920{$DEFINE TGMatrixSortCompare := TMatrixIntegerSortCompare}
     
    2829{$DEFINE TGMatrixItem := TObject}
    2930{$DEFINE TGMatrixIndex := TMatrixObjectIndex}
     31{$DEFINE TGMatrixRow := TMatrixObjectRow}
    3032{$DEFINE TGMatrix := TMatrixObject}
    3133{$DEFINE TGMatrixSortCompare := TMatrixObjectSortCompare}
     
    4547{$DEFINE TGMatrixItem := Integer}
    4648{$DEFINE TGMatrixIndex := TMatrixIntegerIndex}
     49{$DEFINE TGMatrixRow := TMatrixIntegerRow}
    4750{$DEFINE TGMatrix := TMatrixInteger}
    4851{$DEFINE TGMatrixSortCompare := TMatrixIntegerSortCompare}
     
    5760{$DEFINE TGMatrixItem := TObject}
    5861{$DEFINE TGMatrixIndex := TMatrixObjectIndex}
     62{$DEFINE TGMatrixRow := TMatrixObjectRow}
    5963{$DEFINE TGMatrix := TMatrixObject}
    6064{$DEFINE TGMatrixSortCompare := TMatrixObjectSortCompare}
Note: See TracChangeset for help on using the changeset viewer.