- Timestamp:
- Jan 1, 2011, 10:30:09 AM (14 years ago)
- Location:
- Generics/TemplateGenerics/Demo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Demo/Demo.lpi
r107 r108 38 38 </Item2> 39 39 </RequiredPackages> 40 <Units Count="5 6">40 <Units Count="57"> 41 41 <Unit0> 42 42 <Filename Value="Demo.lpr"/> … … 55 55 <ResourceBaseClass Value="Form"/> 56 56 <UnitName Value="UMainForm"/> 57 <IsVisibleTab Value="True"/> 57 58 <EditorIndex Value="0"/> 58 59 <WindowIndex Value="0"/> 59 <TopLine Value=" 50"/>60 <CursorPos X="1 2" Y="61"/>60 <TopLine Value="192"/> 61 <CursorPos X="1" Y="213"/> 61 62 <UsageCount Value="233"/> 62 63 <Loaded Value="True"/> … … 70 71 <TopLine Value="1"/> 71 72 <CursorPos X="1" Y="11"/> 72 <UsageCount Value=" 8"/>73 <UsageCount Value="6"/> 73 74 </Unit2> 74 75 <Unit3> … … 78 79 <TopLine Value="3"/> 79 80 <CursorPos X="43" Y="13"/> 80 <UsageCount Value=" 8"/>81 <UsageCount Value="6"/> 81 82 </Unit3> 82 83 <Unit4> … … 86 87 <TopLine Value="33"/> 87 88 <CursorPos X="12" Y="56"/> 88 <UsageCount Value=" 8"/>89 <UsageCount Value="6"/> 89 90 </Unit4> 90 91 <Unit5> … … 94 95 <TopLine Value="1"/> 95 96 <CursorPos X="23" Y="21"/> 96 <UsageCount Value=" 8"/>97 <UsageCount Value="6"/> 97 98 </Unit5> 98 99 <Unit6> … … 102 103 <TopLine Value="1"/> 103 104 <CursorPos X="23" Y="24"/> 104 <UsageCount Value=" 8"/>105 <UsageCount Value="6"/> 105 106 </Unit6> 106 107 <Unit7> … … 110 111 <TopLine Value="1"/> 111 112 <CursorPos X="23" Y="13"/> 112 <UsageCount Value=" 8"/>113 <UsageCount Value="6"/> 113 114 </Unit7> 114 115 <Unit8> … … 118 119 <TopLine Value="1"/> 119 120 <CursorPos X="23" Y="24"/> 120 <UsageCount Value=" 8"/>121 <UsageCount Value="6"/> 121 122 </Unit8> 122 123 <Unit9> … … 126 127 <TopLine Value="1"/> 127 128 <CursorPos X="31" Y="13"/> 128 <UsageCount Value=" 8"/>129 <UsageCount Value="6"/> 129 130 </Unit9> 130 131 <Unit10> … … 134 135 <TopLine Value="1"/> 135 136 <CursorPos X="29" Y="17"/> 136 <UsageCount Value=" 8"/>137 <UsageCount Value="6"/> 137 138 </Unit10> 138 139 <Unit11> … … 141 142 <TopLine Value="1"/> 142 143 <CursorPos X="1" Y="4"/> 143 <UsageCount Value=" 8"/>144 <UsageCount Value="6"/> 144 145 <DefaultSyntaxHighlighter Value="None"/> 145 146 </Unit11> … … 149 150 <TopLine Value="1"/> 150 151 <CursorPos X="21" Y="6"/> 151 <UsageCount Value=" 8"/>152 <UsageCount Value="6"/> 152 153 <DefaultSyntaxHighlighter Value="None"/> 153 154 </Unit12> … … 157 158 <TopLine Value="1"/> 158 159 <CursorPos X="1" Y="1"/> 159 <UsageCount Value=" 8"/>160 <UsageCount Value="6"/> 160 161 <DefaultSyntaxHighlighter Value="None"/> 161 162 </Unit13> … … 165 166 <TopLine Value="1"/> 166 167 <CursorPos X="25" Y="13"/> 167 <UsageCount Value=" 9"/>168 <UsageCount Value="7"/> 168 169 <DefaultSyntaxHighlighter Value="None"/> 169 170 </Unit14> … … 173 174 <TopLine Value="4"/> 174 175 <CursorPos X="3" Y="6"/> 175 <UsageCount Value=" 8"/>176 <UsageCount Value="6"/> 176 177 <DefaultSyntaxHighlighter Value="None"/> 177 178 </Unit15> … … 181 182 <TopLine Value="1"/> 182 183 <CursorPos X="14" Y="16"/> 183 <UsageCount Value=" 8"/>184 <UsageCount Value="6"/> 184 185 <DefaultSyntaxHighlighter Value="None"/> 185 186 </Unit16> … … 190 191 <TopLine Value="1"/> 191 192 <CursorPos X="32" Y="18"/> 192 <UsageCount Value=" 8"/>193 <UsageCount Value="6"/> 193 194 </Unit17> 194 195 <Unit18> … … 197 198 <TopLine Value="1"/> 198 199 <CursorPos X="20" Y="12"/> 199 <UsageCount Value=" 6"/>200 <UsageCount Value="4"/> 200 201 <DefaultSyntaxHighlighter Value="None"/> 201 202 </Unit18> … … 206 207 <TopLine Value="1"/> 207 208 <CursorPos X="1" Y="22"/> 208 <UsageCount Value=" 6"/>209 <UsageCount Value="4"/> 209 210 </Unit19> 210 211 <Unit20> … … 213 214 <TopLine Value="1"/> 214 215 <CursorPos X="1" Y="1"/> 215 <UsageCount Value=" 6"/>216 <UsageCount Value="4"/> 216 217 <DefaultSyntaxHighlighter Value="None"/> 217 218 </Unit20> … … 221 222 <TopLine Value="1"/> 222 223 <CursorPos X="1" Y="3"/> 223 <UsageCount Value=" 6"/>224 <UsageCount Value="4"/> 224 225 <DefaultSyntaxHighlighter Value="None"/> 225 226 </Unit21> … … 229 230 <TopLine Value="1"/> 230 231 <CursorPos X="1" Y="3"/> 231 <UsageCount Value=" 6"/>232 <UsageCount Value="4"/> 232 233 <DefaultSyntaxHighlighter Value="None"/> 233 234 </Unit22> … … 238 239 <TopLine Value="45"/> 239 240 <CursorPos X="9" Y="79"/> 240 <UsageCount Value=" 5"/>241 <UsageCount Value="3"/> 241 242 </Unit23> 242 243 <Unit24> … … 245 246 <TopLine Value="1"/> 246 247 <CursorPos X="21" Y="4"/> 247 <UsageCount Value=" 10"/>248 <UsageCount Value="8"/> 248 249 <DefaultSyntaxHighlighter Value="None"/> 249 250 </Unit24> … … 254 255 <TopLine Value="1"/> 255 256 <CursorPos X="1" Y="25"/> 256 <UsageCount Value=" 10"/>257 <UsageCount Value="8"/> 257 258 </Unit25> 258 259 <Unit26> … … 261 262 <TopLine Value="1"/> 262 263 <CursorPos X="1" Y="3"/> 263 <UsageCount Value=" 10"/>264 <UsageCount Value="8"/> 264 265 <DefaultSyntaxHighlighter Value="None"/> 265 266 </Unit26> … … 269 270 <TopLine Value="1"/> 270 271 <CursorPos X="7" Y="4"/> 271 <UsageCount Value=" 10"/>272 <UsageCount Value="8"/> 272 273 <DefaultSyntaxHighlighter Value="None"/> 273 274 </Unit27> … … 278 279 <TopLine Value="1"/> 279 280 <CursorPos X="14" Y="15"/> 280 <UsageCount Value=" 10"/>281 <UsageCount Value="8"/> 281 282 </Unit28> 282 283 <Unit29> … … 285 286 <TopLine Value="1"/> 286 287 <CursorPos X="14" Y="18"/> 287 <UsageCount Value=" 10"/>288 <UsageCount Value="8"/> 288 289 <DefaultSyntaxHighlighter Value="None"/> 289 290 </Unit29> … … 294 295 <TopLine Value="2"/> 295 296 <CursorPos X="30" Y="8"/> 296 <UsageCount Value=" 10"/>297 <UsageCount Value="8"/> 297 298 </Unit30> 298 299 <Unit31> … … 302 303 <TopLine Value="13"/> 303 304 <CursorPos X="15" Y="12"/> 304 <UsageCount Value="1 2"/>305 <UsageCount Value="10"/> 305 306 <DefaultSyntaxHighlighter Value="Delphi"/> 306 307 </Unit31> 307 308 <Unit32> 308 309 <Filename Value="../Generic/GenericList.inc"/> 309 <IsVisibleTab Value="True"/> 310 <EditorIndex Value="5"/> 311 <WindowIndex Value="0"/> 312 <TopLine Value="443"/> 313 <CursorPos X="17" Y="453"/> 314 <UsageCount Value="99"/> 310 <EditorIndex Value="6"/> 311 <WindowIndex Value="0"/> 312 <TopLine Value="3"/> 313 <CursorPos X="1" Y="13"/> 314 <UsageCount Value="107"/> 315 315 <Loaded Value="True"/> 316 316 </Unit32> … … 320 320 <TopLine Value="31"/> 321 321 <CursorPos X="44" Y="47"/> 322 <UsageCount Value="9 8"/>322 <UsageCount Value="96"/> 323 323 </Unit33> 324 324 <Unit34> … … 327 327 <TopLine Value="1"/> 328 328 <CursorPos X="36" Y="48"/> 329 <UsageCount Value="9 8"/>329 <UsageCount Value="96"/> 330 330 </Unit34> 331 331 <Unit35> … … 334 334 <TopLine Value="3"/> 335 335 <CursorPos X="1" Y="3"/> 336 <UsageCount Value="9 8"/>336 <UsageCount Value="96"/> 337 337 </Unit35> 338 338 <Unit36> … … 341 341 <TopLine Value="11"/> 342 342 <CursorPos X="42" Y="11"/> 343 <UsageCount Value="9 8"/>343 <UsageCount Value="96"/> 344 344 </Unit36> 345 345 <Unit37> … … 348 348 <TopLine Value="3"/> 349 349 <CursorPos X="1" Y="3"/> 350 <UsageCount Value="9 8"/>350 <UsageCount Value="96"/> 351 351 </Unit37> 352 352 <Unit38> … … 355 355 <TopLine Value="1"/> 356 356 <CursorPos X="22" Y="30"/> 357 <UsageCount Value="9 8"/>357 <UsageCount Value="96"/> 358 358 </Unit38> 359 359 <Unit39> … … 363 363 <TopLine Value="6"/> 364 364 <CursorPos X="56" Y="36"/> 365 <UsageCount Value="9 7"/>365 <UsageCount Value="95"/> 366 366 </Unit39> 367 367 <Unit40> … … 371 371 <TopLine Value="27"/> 372 372 <CursorPos X="50" Y="59"/> 373 <UsageCount Value="9 6"/>373 <UsageCount Value="94"/> 374 374 </Unit40> 375 375 <Unit41> … … 379 379 <TopLine Value="57"/> 380 380 <CursorPos X="48" Y="85"/> 381 <UsageCount Value="9 6"/>381 <UsageCount Value="94"/> 382 382 </Unit41> 383 383 <Unit42> … … 386 386 <TopLine Value="1"/> 387 387 <CursorPos X="33" Y="14"/> 388 <UsageCount Value="9 6"/>388 <UsageCount Value="94"/> 389 389 </Unit42> 390 390 <Unit43> … … 394 394 <TopLine Value="52"/> 395 395 <CursorPos X="1" Y="81"/> 396 <UsageCount Value="9 6"/>396 <UsageCount Value="94"/> 397 397 </Unit43> 398 398 <Unit44> … … 402 402 <TopLine Value="29"/> 403 403 <CursorPos X="1" Y="62"/> 404 <UsageCount Value="9 6"/>404 <UsageCount Value="94"/> 405 405 </Unit44> 406 406 <Unit45> … … 410 410 <TopLine Value="9"/> 411 411 <CursorPos X="60" Y="36"/> 412 <UsageCount Value="9 5"/>412 <UsageCount Value="93"/> 413 413 </Unit45> 414 414 <Unit46> 415 415 <Filename Value="../Specialized/SpecializedList.pas"/> 416 416 <UnitName Value="SpecializedList"/> 417 <EditorIndex Value=" 6"/>418 <WindowIndex Value="0"/> 419 <TopLine Value=" 73"/>417 <EditorIndex Value="7"/> 418 <WindowIndex Value="0"/> 419 <TopLine Value="1"/> 420 420 <CursorPos X="1" Y="104"/> 421 <UsageCount Value=" 95"/>421 <UsageCount Value="103"/> 422 422 <Loaded Value="True"/> 423 423 </Unit46> 424 424 <Unit47> 425 425 <Filename Value="../Generic/GenericMatrix.inc"/> 426 <EditorIndex Value=" 8"/>426 <EditorIndex Value="9"/> 427 427 <WindowIndex Value="0"/> 428 428 <TopLine Value="1"/> 429 429 <CursorPos X="33" Y="10"/> 430 <UsageCount Value=" 95"/>430 <UsageCount Value="103"/> 431 431 <Loaded Value="True"/> 432 432 </Unit47> … … 437 437 <TopLine Value="2624"/> 438 438 <CursorPos X="37" Y="2636"/> 439 <UsageCount Value="9 4"/>439 <UsageCount Value="92"/> 440 440 </Unit48> 441 441 <Unit49> … … 444 444 <TopLine Value="94"/> 445 445 <CursorPos X="1" Y="1"/> 446 <UsageCount Value=" 10"/>446 <UsageCount Value="8"/> 447 447 <DefaultSyntaxHighlighter Value="XML"/> 448 448 </Unit49> 449 449 <Unit50> 450 450 <Filename Value="/usr/share/fpcsrc/rtl/objpas/classes/classesh.inc"/> 451 <EditorIndex Value=" 1"/>452 <WindowIndex Value="0"/> 453 <TopLine Value=" 182"/>454 <CursorPos X=" 55" Y="185"/>455 <UsageCount Value=" 11"/>451 <EditorIndex Value="2"/> 452 <WindowIndex Value="0"/> 453 <TopLine Value="32"/> 454 <CursorPos X="11" Y="36"/> 455 <UsageCount Value="20"/> 456 456 <Loaded Value="True"/> 457 457 </Unit50> 458 458 <Unit51> 459 459 <Filename Value="/usr/share/fpcsrc/rtl/objpas/classes/lists.inc"/> 460 <EditorIndex Value=" 4"/>460 <EditorIndex Value="5"/> 461 461 <WindowIndex Value="0"/> 462 462 <TopLine Value="462"/> 463 <CursorPos X=" 3" Y="464"/>464 <UsageCount Value=" 11"/>463 <CursorPos X="25" Y="464"/> 464 <UsageCount Value="20"/> 465 465 <Loaded Value="True"/> 466 466 </Unit51> 467 467 <Unit52> 468 468 <Filename Value="../Generic/GenericListObject.inc"/> 469 <EditorIndex Value=" 7"/>469 <EditorIndex Value="8"/> 470 470 <WindowIndex Value="0"/> 471 471 <TopLine Value="1"/> 472 472 <CursorPos X="21" Y="20"/> 473 <UsageCount Value=" 11"/>473 <UsageCount Value="20"/> 474 474 <Loaded Value="True"/> 475 475 </Unit52> … … 477 477 <Filename Value="/usr/share/fpcsrc/rtl/objpas/objpas.pp"/> 478 478 <UnitName Value="objpas"/> 479 <EditorIndex Value=" 2"/>480 <WindowIndex Value="0"/> 481 <TopLine Value=" 9"/>479 <EditorIndex Value="3"/> 480 <WindowIndex Value="0"/> 481 <TopLine Value="1"/> 482 482 <CursorPos X="27" Y="26"/> 483 <UsageCount Value=" 11"/>483 <UsageCount Value="20"/> 484 484 <Loaded Value="True"/> 485 485 </Unit53> 486 486 <Unit54> 487 487 <Filename Value="/usr/share/fpcsrc/rtl/inc/systemh.inc"/> 488 <EditorIndex Value=" 3"/>488 <EditorIndex Value="4"/> 489 489 <WindowIndex Value="0"/> 490 490 <TopLine Value="381"/> 491 491 <CursorPos X="3" Y="398"/> 492 <UsageCount Value=" 11"/>492 <UsageCount Value="20"/> 493 493 <Loaded Value="True"/> 494 494 </Unit54> … … 498 498 <TopLine Value="475"/> 499 499 <CursorPos X="10" Y="503"/> 500 <UsageCount Value=" 10"/>500 <UsageCount Value="8"/> 501 501 </Unit55> 502 <Unit56> 503 <Filename Value="../../../../../lazarus/trunk/lcl/include/control.inc"/> 504 <EditorIndex Value="1"/> 505 <WindowIndex Value="0"/> 506 <TopLine Value="2270"/> 507 <CursorPos X="22" Y="2273"/> 508 <UsageCount Value="11"/> 509 <Loaded Value="True"/> 510 </Unit56> 502 511 </Units> 503 512 <JumpHistory Count="30" HistoryIndex="29"> 504 513 <Position1> 505 <Filename Value=" ../Generic/GenericList.inc"/>506 <Caret Line=" 9" Column="45" TopLine="1"/>514 <Filename Value="UMainForm.pas"/> 515 <Caret Line="512" Column="30" TopLine="479"/> 507 516 </Position1> 508 517 <Position2> 509 518 <Filename Value="UMainForm.pas"/> 510 <Caret Line=" 38" Column="16" TopLine="11"/>519 <Caret Line="506" Column="49" TopLine="482"/> 511 520 </Position2> 512 521 <Position3> 513 522 <Filename Value="UMainForm.pas"/> 514 <Caret Line="4 0" Column="95" TopLine="11"/>523 <Caret Line="41" Column="43" TopLine="40"/> 515 524 </Position3> 516 525 <Position4> 517 526 <Filename Value="UMainForm.pas"/> 518 <Caret Line=" 43" Column="37" TopLine="24"/>527 <Caret Line="63" Column="9" TopLine="46"/> 519 528 </Position4> 520 529 <Position5> 521 530 <Filename Value="UMainForm.pas"/> 522 <Caret Line=" 37" Column="1" TopLine="29"/>531 <Caret Line="41" Column="55" TopLine="24"/> 523 532 </Position5> 524 533 <Position6> 525 534 <Filename Value="UMainForm.pas"/> 526 <Caret Line=" 470" Column="1" TopLine="442"/>535 <Caret Line="506" Column="61" TopLine="483"/> 527 536 </Position6> 528 537 <Position7> 529 538 <Filename Value="UMainForm.pas"/> 530 <Caret Line=" 10" Column="12" TopLine="21"/>539 <Caret Line="63" Column="8" TopLine="46"/> 531 540 </Position7> 532 541 <Position8> 533 542 <Filename Value="UMainForm.pas"/> 534 <Caret Line=" 277" Column="17" TopLine="258"/>543 <Caret Line="41" Column="15" TopLine="1"/> 535 544 </Position8> 536 545 <Position9> 537 <Filename Value=" /usr/share/fpcsrc/rtl/objpas/classes/lists.inc"/>538 <Caret Line=" 596" Column="16" TopLine="590"/>546 <Filename Value="UMainForm.pas"/> 547 <Caret Line="66" Column="9" TopLine="49"/> 539 548 </Position9> 540 549 <Position10> 541 <Filename Value=" ../Generic/GenericList.inc"/>542 <Caret Line=" 11" Column="16" TopLine="1"/>550 <Filename Value="UMainForm.pas"/> 551 <Caret Line="41" Column="15" TopLine="1"/> 543 552 </Position10> 544 553 <Position11> 545 <Filename Value=" ../Generic/GenericList.inc"/>546 <Caret Line=" 46" Column="19" TopLine="18"/>554 <Filename Value="UMainForm.pas"/> 555 <Caret Line="63" Column="31" TopLine="46"/> 547 556 </Position11> 548 557 <Position12> 549 <Filename Value=" ../Generic/GenericList.inc"/>550 <Caret Line=" 47" Column="19" TopLine="19"/>558 <Filename Value="UMainForm.pas"/> 559 <Caret Line="3" Column="19" TopLine="1"/> 551 560 </Position12> 552 561 <Position13> 553 <Filename Value=" ../Generic/GenericList.inc"/>554 <Caret Line=" 48" Column="20" TopLine="20"/>562 <Filename Value="UMainForm.pas"/> 563 <Caret Line="63" Column="9" TopLine="46"/> 555 564 </Position13> 556 565 <Position14> 557 <Filename Value=" ../Generic/GenericList.inc"/>558 <Caret Line=" 52" Column="57" TopLine="26"/>566 <Filename Value="UMainForm.pas"/> 567 <Caret Line="41" Column="26" TopLine="24"/> 559 568 </Position14> 560 569 <Position15> 561 <Filename Value=" /usr/share/fpcsrc/rtl/objpas/classes/lists.inc"/>562 <Caret Line=" 594" Column="11" TopLine="590"/>570 <Filename Value="UMainForm.pas"/> 571 <Caret Line="63" Column="10" TopLine="46"/> 563 572 </Position15> 564 573 <Position16> 565 <Filename Value=" /usr/share/fpcsrc/rtl/objpas/classes/lists.inc"/>566 <Caret Line=" 596" Column="13" TopLine="590"/>574 <Filename Value="UMainForm.pas"/> 575 <Caret Line="41" Column="47" TopLine="24"/> 567 576 </Position16> 568 577 <Position17> 569 <Filename Value=" /usr/share/fpcsrc/rtl/objpas/classes/lists.inc"/>570 <Caret Line=" 98" Column="56" TopLine="89"/>578 <Filename Value="UMainForm.pas"/> 579 <Caret Line="506" Column="53" TopLine="483"/> 571 580 </Position17> 572 581 <Position18> 573 <Filename Value=" /usr/share/fpcsrc/rtl/objpas/classes/lists.inc"/>574 <Caret Line=" 91" Column="43" TopLine="89"/>582 <Filename Value="UMainForm.pas"/> 583 <Caret Line="63" Column="43" TopLine="46"/> 575 584 </Position18> 576 585 <Position19> 577 <Filename Value=" ../Generic/GenericList.inc"/>578 <Caret Line=" 470" Column="59" TopLine="206"/>586 <Filename Value="UMainForm.pas"/> 587 <Caret Line="61" Column="17" TopLine="46"/> 579 588 </Position19> 580 589 <Position20> 581 590 <Filename Value="UMainForm.pas"/> 582 <Caret Line=" 277" Column="17" TopLine="258"/>591 <Caret Line="64" Column="17" TopLine="47"/> 583 592 </Position20> 584 593 <Position21> 585 <Filename Value=" ../Generic/GenericList.inc"/>586 <Caret Line=" 161" Column="1" TopLine="161"/>594 <Filename Value="UMainForm.pas"/> 595 <Caret Line="50" Column="49" TopLine="31"/> 587 596 </Position21> 588 597 <Position22> 589 <Filename Value=" ../Generic/GenericList.inc"/>590 <Caret Line=" 89" Column="14" TopLine="84"/>598 <Filename Value="UMainForm.pas"/> 599 <Caret Line="61" Column="17" TopLine="47"/> 591 600 </Position22> 592 601 <Position23> 593 <Filename Value=" ../Generic/GenericList.inc"/>594 <Caret Line=" 189" Column="29" TopLine="172"/>602 <Filename Value="UMainForm.pas"/> 603 <Caret Line="64" Column="11" TopLine="47"/> 595 604 </Position23> 596 605 <Position24> 597 <Filename Value=" ../Generic/GenericList.inc"/>598 <Caret Line=" 405" Column="14" TopLine="389"/>606 <Filename Value="UMainForm.pas"/> 607 <Caret Line="63" Column="34" TopLine="41"/> 599 608 </Position24> 600 609 <Position25> 601 <Filename Value=" ../Generic/GenericList.inc"/>602 <Caret Line=" 51" Column="59" TopLine="34"/>610 <Filename Value="UMainForm.pas"/> 611 <Caret Line="432" Column="14" TopLine="415"/> 603 612 </Position25> 604 613 <Position26> 605 <Filename Value=" ../Generic/GenericList.inc"/>606 <Caret Line=" 119" Column="3" TopLine="117"/>614 <Filename Value="UMainForm.pas"/> 615 <Caret Line="41" Column="34" TopLine="24"/> 607 616 </Position26> 608 617 <Position27> 609 <Filename Value=" ../Generic/GenericList.inc"/>610 <Caret Line=" 433" Column="19" TopLine="416"/>618 <Filename Value="UMainForm.pas"/> 619 <Caret Line="506" Column="40" TopLine="483"/> 611 620 </Position27> 612 621 <Position28> 613 622 <Filename Value="UMainForm.pas"/> 614 <Caret Line=" 278" Column="17" TopLine="91"/>623 <Caret Line="41" Column="46" TopLine="24"/> 615 624 </Position28> 616 625 <Position29> 617 <Filename Value=" ../Specialized/SpecializedList.pas"/>618 <Caret Line=" 104" Column="5" TopLine="73"/>626 <Filename Value="UMainForm.pas"/> 627 <Caret Line="506" Column="47" TopLine="483"/> 619 628 </Position29> 620 629 <Position30> 621 630 <Filename Value="UMainForm.pas"/> 622 <Caret Line=" 403" Column="11" TopLine="385"/>631 <Caret Line="142" Column="38" TopLine="114"/> 623 632 </Position30> 624 633 </JumpHistory> -
Generics/TemplateGenerics/Demo/UMainForm.lfm
r91 r108 1 1 object MainForm: TMainForm 2 Left = 3883 Height = 3974 Top = 1 215 Width = 4782 Left = 261 3 Height = 520 4 Top = 104 5 Width = 692 6 6 ActiveControl = ButtonIntegerList 7 7 Caption = 'Template generics demo' 8 ClientHeight = 3979 ClientWidth = 4788 ClientHeight = 520 9 ClientWidth = 692 10 10 OnCreate = FormCreate 11 11 OnDestroy = FormDestroy … … 20 20 TabOrder = 0 21 21 end 22 object MemoOutput: TMemo23 Left = 14424 Height = 38425 Top = 826 Width = 32827 Anchors = [akTop, akLeft, akRight, akBottom]28 ReadOnly = True29 ScrollBars = ssAutoBoth30 TabOrder = 131 end32 22 object ButtonStringList: TButton 33 23 Left = 8 … … 37 27 Caption = 'TListString' 38 28 OnClick = ButtonStringListClick 39 TabOrder = 229 TabOrder = 1 40 30 end 41 31 object ButtonDictionaryString: TButton … … 46 36 Caption = 'TDictionaryString' 47 37 OnClick = ButtonDictionaryStringClick 48 TabOrder = 338 TabOrder = 2 49 39 end 50 40 object ButtonQueueInteger: TButton … … 55 45 Caption = 'TQueueInteger' 56 46 OnClick = ButtonQueueIntegerClick 57 TabOrder = 447 TabOrder = 3 58 48 end 59 49 object ButtonCharList: TButton … … 64 54 Caption = 'TListChar(TString)' 65 55 OnClick = ButtonCharListClick 66 TabOrder = 556 TabOrder = 4 67 57 end 68 58 object ButtonBenchmarkList: TButton 69 59 Left = 8 70 Height = 2 571 Top = 36760 Height = 24 61 Top = 491 72 62 Width = 128 63 Anchors = [akLeft, akBottom] 73 64 Caption = 'Benchmark list' 74 65 OnClick = ButtonBenchmarkListClick 75 TabOrder = 666 TabOrder = 5 76 67 end 77 68 object ButtonListObject: TButton … … 82 73 Caption = 'TListObject' 83 74 OnClick = ButtonListObjectClick 84 TabOrder = 775 TabOrder = 6 85 76 end 86 77 object ButtonBenchmarkDictionary: TButton 87 78 Left = 10 88 79 Height = 25 89 Top = 33680 Top = 459 90 81 Width = 126 82 Anchors = [akLeft, akBottom] 91 83 Caption = 'Benchmark dictionary' 92 84 OnClick = ButtonBenchmarkDictionaryClick 85 TabOrder = 7 86 end 87 object ButtonMatrixInteger: TButton 88 Left = 7 89 Height = 25 90 Top = 192 91 Width = 129 92 Caption = 'TMatrixInteger' 93 OnClick = ButtonMatrixIntegerClick 93 94 TabOrder = 8 94 95 end 96 object ListViewOutput: TListView 97 Left = 144 98 Height = 507 99 Top = 8 100 Width = 542 101 Anchors = [akTop, akLeft, akRight, akBottom] 102 Columns = < 103 item 104 Caption = 'Action' 105 Width = 200 106 end 107 item 108 Caption = 'Value' 109 Width = 316 110 end> 111 ReadOnly = True 112 TabOrder = 9 113 ViewStyle = vsReport 114 end 95 115 end -
Generics/TemplateGenerics/Demo/UMainForm.pas
r107 r108 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 9 ComCtrls, SpecializedList, SpecializedDictionary, SpecializedQueue, 10 DateUtils ;10 DateUtils, SpecializedMatrix; 11 11 12 12 type … … 19 19 ButtonBenchmarkList: TButton; 20 20 ButtonCharList: TButton; 21 ButtonMatrixInteger: TButton; 21 22 ButtonQueueInteger: TButton; 22 23 ButtonDictionaryString: TButton; 23 24 ButtonIntegerList: TButton; 24 25 ButtonStringList: TButton; 25 MemoOutput: TMemo;26 ListViewOutput: TListView; 26 27 procedure ButtonBenchmarkDictionaryClick(Sender: TObject); 27 28 procedure ButtonBenchmarkListClick(Sender: TObject); … … 29 30 procedure ButtonDictionaryStringClick(Sender: TObject); 30 31 procedure ButtonIntegerListClick(Sender: TObject); 32 procedure ButtonMatrixIntegerClick(Sender: TObject); 31 33 procedure ButtonListObjectClick(Sender: TObject); 32 34 procedure ButtonQueueIntegerClick(Sender: TObject); … … 37 39 public 38 40 Bitmap: TBitmap; 39 procedure Write Ln(Text: string = '');41 procedure WriteOutput(Text1: string = ''; Text2: string = ''); 40 42 end; 41 43 … … 58 60 I: Integer; 59 61 begin 60 MemoOutput.Clear;61 Write Ln('TListInteger test');62 ListViewOutput.Clear; 63 WriteOutput('TListInteger test'); 62 64 List := TListInteger.Create; 63 65 with List do try 64 WriteLn('AddArray([10, 20, 30, 40])');65 66 AddArray([10, 20, 30, 40]); 66 WriteLn('Implode: ' + Implode(',', IntToStr)); 67 WriteOutput('AddArray([10, 20, 30, 40])', Implode(',', IntToStr)); 68 Clear; 69 WriteOutput('Clear', Implode(',', IntToStr)); 70 for I := 0 to 10 do Add(I); 71 WriteOutput('for I := 0 to 10 do Add(I)', Implode(',', IntToStr)); 72 WriteOutput('Count', IntToStr(Count)); 73 Reverse; 74 WriteOutput('Reverse', Implode(',', IntToStr)); 75 WriteOutput('First', IntToStr(First)); 76 WriteOutput('Last', IntToStr(Last)); 77 MoveItems(3, 2, 3); 78 WriteOutput('MoveItems(3, 2, 3)', Implode(',', IntToStr)); 79 Insert(5, 11); 80 WriteOutput('Insert(5, 11)', Implode(',', IntToStr)); 81 finally 82 Free; 83 end; 84 end; 85 86 procedure TMainForm.ButtonMatrixIntegerClick(Sender: TObject); 87 var 88 Matrix: TMatrixInteger; 89 I: Integer; 90 begin 91 ListViewOutput.Clear; 92 WriteOutput('TListInteger test'); 93 Matrix := TMatrixInteger.Create; 94 with Matrix do try 95 WriteOutput('AddMatrix([10, 20, 30, 40])'); 96 //AddMatrix([10, 20, 30, 40]); 97 WriteOutput('Implode: ' + Implode(',', IntToStr)); 67 98 Clear; 68 99 for I := 0 to 10 do Add(I); 69 Write Ln('Implode: ' + Implode(',', IntToStr));70 Write Ln('Count: ' + IntToStr(Count));71 Write Ln('Implode: ' + Implode(',', IntToStr));72 Write Ln('Reverse');100 WriteOutput('Implode: ' + Implode(',', IntToStr)); 101 WriteOutput('Count: Y: ' + IntToStr(Count.Y) + ', ' + IntToStr(Count.X)); 102 WriteOutput('Implode: ' + Implode(',', IntToStr)); 103 WriteOutput('Reverse'); 73 104 Reverse; 74 Write Ln('Implode: ' + Implode(',', IntToStr));75 Write Ln('First: ' + IntToStr(First));76 Write Ln('Last: ' + IntToStr(Last));77 MoveItems(3, 2, 3);78 Write Ln('Implode: ' + Implode(',', IntToStr));79 Write Ln('Insert(5, 11)');80 Insert(5, 11);81 Write Ln('Implode: ' + Implode(',', IntToStr));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)); 82 113 finally 83 114 Free; … … 95 126 I: Integer; 96 127 begin 97 MemoOutput.Clear;98 Write Ln('TListObject test');128 ListViewOutput.Clear; 129 WriteOutput('TListObject test'); 99 130 List := TListObject.Create; 100 131 with List do try 101 132 AddArray([TObject.Create, TObject.Create, TObject.Create, TObject.Create]); 102 Write Ln('Implode: ' +Implode(',', ObjectToStr));133 WriteOutput('AddArray([TObject.Create, TObject.Create, TObject.Create, TObject.Create])', Implode(',', ObjectToStr)); 103 134 Clear; 135 WriteOutput('Clear', Implode(',', ObjectToStr)); 104 136 for I := 0 to 10 do Add(TObject.Create); 105 WriteLn('Implode: ' + Implode(',', ObjectToStr)); 106 WriteLn('Count: ' + IntToStr(Count)); 107 WriteLn('Implode: ' + Implode(',', ObjectToStr)); 108 WriteLn('Reverse'); 137 WriteOutput('for I := 0 to 10 do Add(TObject.Create)', Implode(',', ObjectToStr)); 138 WriteOutput('Count', IntToStr(Count)); 109 139 Reverse; 110 Write Ln('Implode: ' +Implode(',', ObjectToStr));140 WriteOutput('Reverse', Implode(',', ObjectToStr)); 111 141 MoveItems(3, 2, 3); 112 Write Ln('Implode: ' +Implode(',', ObjectToStr));142 WriteOutput('MoveItems(3, 2, 3)', Implode(',', ObjectToStr)); 113 143 finally 114 144 Free; … … 121 151 I: Integer; 122 152 begin 123 MemoOutput.Clear;124 Write Ln('TQueueInteger test');153 ListViewOutput.Clear; 154 WriteOutput('TQueueInteger test'); 125 155 Queue := TQueueInteger.Create; 126 156 with Queue do try … … 128 158 Enqueue(2); 129 159 Enqueue(3); 130 WriteLn('Implode: ' + List.Implode(',', IntToStr)); 131 WriteLn('Enqueue: 4'); 160 WriteOutput('Enqueue(1),Enqueue(2),Enqueue(3) ', List.Implode(',', IntToStr)); 132 161 Enqueue(4); 133 Write Ln('Implode: ' +List.Implode(',', IntToStr));134 Write Ln('Dequeue: ' +IntToStr(Dequeue));135 Write Ln('Implode: ' +List.Implode(',', IntToStr));162 WriteOutput('Enqueue(4)', List.Implode(',', IntToStr)); 163 WriteOutput('Dequeued item', IntToStr(Dequeue)); 164 WriteOutput('Dequeue', List.Implode(',', IntToStr)); 136 165 finally 137 166 Free; … … 148 177 Dictionary: TDictionaryStringString; 149 178 begin 150 MemoOutput.Clear;151 Write Ln('TDictionaryString test');179 ListViewOutput.Clear; 180 WriteOutput('TDictionaryString test'); 152 181 Dictionary := TDictionaryStringString.Create; 153 182 with Dictionary do try … … 155 184 Add('Key2', 'Value2'); 156 185 Add('Key3', 'Value3'); 157 Write Ln('Implode: ' +Implode(',', StringPairToStr));158 Write Ln('Values[Key2]: ' +Values['Key2']);159 Write Ln('Values[Key2] = None');186 WriteOutput('Add(''Key1'', ''Value1''),Add(''Key1'', ''Value1''),Add(''Key1'', ''Value1'')', Implode(',', StringPairToStr)); 187 WriteOutput('Values[Key2]', Values['Key2']); 188 WriteOutput('Values[Key2] = None'); 160 189 Values['Key2'] := 'None'; 161 Write Ln('Values[Key2]: ' +Values['Key2']);162 Write Ln('Values[Key0]: ' +Values['Key0']);163 Write Ln('Keys[2]: ' +Keys[2]);190 WriteOutput('Values[Key2]', Values['Key2']); 191 WriteOutput('Values[Key0]', Values['Key0']); 192 WriteOutput('Keys[2]', Keys[2]); 164 193 finally 165 194 Free; … … 176 205 List: TListChar; 177 206 begin 178 MemoOutput.Clear;179 Write Ln('TListChar test');207 ListViewOutput.Clear; 208 WriteOutput('TListChar test'); 180 209 List := TListChar.Create; 181 210 with List do try 182 211 AddArray([' ', ' ', 'A', 'b', 'c', 'd', ' ']); 183 WriteLn('Implode: ''' + Implode('', CharToStr) + ''''); 184 WriteLn('Implode: ' + Implode('', CharToStr)); 185 WriteLn('Reverse'); 212 WriteOutput('AddArray(['' '', '' '', ''A'', ''b'', ''c'', ''d'', '' ''])', 213 '''' + Implode('', CharToStr) + ''''); 186 214 Reverse; 187 WriteLn('Implode: ''' + Implode('', CharToStr) + ''''); 188 WriteLn('TrimLeft'); 215 WriteOutput('Reverse', '''' + Implode('', CharToStr) + ''''); 189 216 TrimLeft; 190 WriteLn('Implode: ''' + Implode('', CharToStr) + ''''); 191 WriteLn('TrimRight'); 217 WriteOutput('TrimLeft', '''' + Implode('', CharToStr) + ''''); 192 218 TrimRight; 193 WriteLn('Implode: ''' + Implode('', CharToStr) + ''''); 194 WriteLn('UpperCase'); 219 WriteOutput('TrimRight', '''' + Implode('', CharToStr) + ''''); 195 220 UpperCase; 196 WriteLn('Implode: ''' + Implode('', CharToStr) + ''''); 221 WriteOutput('UpperCase', '''' + Implode('', CharToStr) + ''''); 222 LowerCase; 223 WriteOutput('LowerCase', '''' + Implode('', CharToStr) + ''''); 197 224 finally 198 225 Free; … … 207 234 I: Integer; 208 235 begin 209 MemoOutput.Clear;236 ListViewOutput.Clear; 210 237 try 211 238 List := TListPointer.Create; 212 WriteLn('TListPointer...'); 239 List2 := TList.Create; 240 213 241 StartTime := Now; 214 242 repeat 215 243 List.Add(1); 216 244 until (Now - StartTime) > OneSecond; 217 Write Ln('Add: ' +IntToStr(List.Count) + ' ops/sec');245 WriteOutput('TListPointer.Add', IntToStr(List.Count) + ' ops/sec'); 218 246 List.Clear; 219 247 Application.ProcessMessages; … … 221 249 StartTime := Now; 222 250 repeat 251 List2.Add(1); 252 until (Now - StartTime) > OneSecond; 253 WriteOutput('TList.Add', IntToStr(List2.Count) + ' ops/sec'); 254 List2.Clear; 255 Application.ProcessMessages; 256 257 StartTime := Now; 258 repeat 223 259 List.Insert(0, 1); 224 260 until (Now - StartTime) > OneSecond; 225 Write Ln('Insert: ' +IntToStr(List.Count) + ' ops/sec');261 WriteOutput('TListPointer.Insert', IntToStr(List.Count) + ' ops/sec'); 226 262 List.Clear; 227 263 Application.ProcessMessages; 228 264 265 StartTime := Now; 266 repeat 267 List2.Insert(0, 1); 268 until (Now - StartTime) > OneSecond; 269 WriteOutput('TList.Insert', IntToStr(List2.Count) + ' ops/sec'); 270 List2.Clear; 271 Application.ProcessMessages; 272 229 273 for I := 0 to 1000000 do 230 274 List.Add(1); … … 235 279 Inc(I); 236 280 until (Now - StartTime) > OneSecond; 237 Write Ln('Delete: ' +IntToStr(I) + ' ops/sec');281 WriteOutput('TListPointer.Delete', IntToStr(I) + ' ops/sec'); 238 282 List.Clear; 239 283 Application.ProcessMessages; 240 284 241 285 for I := 0 to 1000000 do 286 List2.Add(1); 287 StartTime := Now; 288 I := 0; 289 repeat 290 List2.Delete(0); 291 Inc(I); 292 until (Now - StartTime) > OneSecond; 293 WriteOutput('TList.Delete', IntToStr(I) + ' ops/sec'); 294 Application.ProcessMessages; 295 296 for I := 0 to 1000000 do 242 297 List.Add(1); 243 298 StartTime := Now; … … 247 302 Inc(I); 248 303 until (Now - StartTime) > OneSecond; 249 Write Ln('Move: ' +IntToStr(I) + ' ops/sec');304 WriteOutput('TListPointer.Move', IntToStr(I) + ' ops/sec'); 250 305 List.Clear; 251 306 Application.ProcessMessages; 252 307 253 308 for I := 0 to 1000000 do 309 List2.Add(1); 310 StartTime := Now; 311 I := 0; 312 repeat 313 List2.Move(300000, 700000); 314 Inc(I); 315 until (Now - StartTime) > OneSecond; 316 WriteOutput('TList.Move', IntToStr(I) + ' ops/sec'); 317 Application.ProcessMessages; 318 319 for I := 0 to 1000000 do 254 320 List.Add(1); 255 321 StartTime := Now; … … 259 325 Inc(I); 260 326 until (Now - StartTime) > OneSecond; 261 Write Ln('Exchange: ' +IntToStr(I) + ' ops/sec');327 WriteOutput('TListPointer.Exchange', IntToStr(I) + ' ops/sec'); 262 328 List.Clear; 263 329 Application.ProcessMessages; 264 330 265 331 for I := 0 to 1000000 do 332 List2.Add(1); 333 StartTime := Now; 334 I := 0; 335 repeat 336 List2.Exchange(300000, 700000); 337 Inc(I); 338 until (Now - StartTime) > OneSecond; 339 WriteOutput('TList.Exchange', IntToStr(I) + ' ops/sec'); 340 Application.ProcessMessages; 341 342 for I := 0 to 1000000 do 266 343 List.Add(1); 267 344 StartTime := Now; … … 271 348 Inc(I); 272 349 until (Now - StartTime) > OneSecond; 273 Write Ln('IndexOf: ' +IntToStr(I) + ' ops/sec');350 WriteOutput('TListPointer.IndexOf', IntToStr(I) + ' ops/sec'); 274 351 List.Clear; 275 352 Application.ProcessMessages; 353 354 for I := 0 to 1000000 do 355 List2.Add(1); 356 StartTime := Now; 357 I := 0; 358 repeat 359 List2.IndexOf(Pointer(I mod List2.Count)); 360 Inc(I); 361 until (Now - StartTime) > OneSecond; 362 WriteOutput('TList.IndexOf', IntToStr(I) + ' ops/sec'); 363 Application.ProcessMessages; 364 276 365 finally 277 366 List.Free; 278 end;279 280 try281 List2 := TList.Create;282 WriteLn;283 WriteLn('Test TList...');284 StartTime := Now;285 repeat286 List2.Add(1);287 until (Now - StartTime) > OneSecond;288 WriteLn('Add: ' + IntToStr(List2.Count) + ' ops/sec');289 List2.Clear;290 Application.ProcessMessages;291 292 StartTime := Now;293 repeat294 List2.Insert(0, 1);295 until (Now - StartTime) > OneSecond;296 WriteLn('Insert: ' + IntToStr(List2.Count) + ' ops/sec');297 List2.Clear;298 Application.ProcessMessages;299 300 for I := 0 to 1000000 do301 List2.Add(1);302 StartTime := Now;303 I := 0;304 repeat305 List2.Delete(0);306 Inc(I);307 until (Now - StartTime) > OneSecond;308 WriteLn('Delete: ' + IntToStr(I) + ' ops/sec');309 Application.ProcessMessages;310 311 for I := 0 to 1000000 do312 List2.Add(1);313 StartTime := Now;314 I := 0;315 repeat316 List2.Move(300000, 700000);317 Inc(I);318 until (Now - StartTime) > OneSecond;319 WriteLn('Move: ' + IntToStr(I) + ' ops/sec');320 Application.ProcessMessages;321 322 for I := 0 to 1000000 do323 List2.Add(1);324 StartTime := Now;325 I := 0;326 repeat327 List2.Exchange(300000, 700000);328 Inc(I);329 until (Now - StartTime) > OneSecond;330 WriteLn('Exchange: ' + IntToStr(I) + ' ops/sec');331 Application.ProcessMessages;332 333 for I := 0 to 1000000 do334 List2.Add(1);335 StartTime := Now;336 I := 0;337 repeat338 List2.IndexOf(Pointer(I mod List.Count));339 Inc(I);340 until (Now - StartTime) > OneSecond;341 WriteLn('IndexOf: ' + IntToStr(I) + ' ops/sec');342 Application.ProcessMessages;343 344 finally345 367 List2.Free; 346 368 end; … … 355 377 R: string; 356 378 begin 357 MemoOutput.Clear;379 ListViewOutput.Clear; 358 380 try 359 381 Dictionary := TDictionaryStringString.Create; 360 WriteLn('TDictionaryStringString...');361 I := 0;362 StartTime := Now;363 repeat364 Dictionary.Add(IntToStr(I), IntToStr(I));365 I := I + 1;366 until (Now - StartTime) > OneSecond;367 WriteLn('Add pair: ' + IntToStr(Dictionary.Count) + ' ops/sec');368 Application.ProcessMessages;369 370 I := 0;371 StartTime := Now;372 repeat373 R := Dictionary.Values[IntToStr(I mod Dictionary.Count)];374 I := I + 1;375 until (Now - StartTime) > OneSecond;376 WriteLn('Values: ' + IntToStr(I) + ' ops/sec');377 Application.ProcessMessages;378 379 I := 0;380 StartTime := Now;381 repeat382 R := Dictionary.Keys[I mod Dictionary.Count];383 I := I + 1;384 until (Now - StartTime) > OneSecond;385 WriteLn('Keys: ' + IntToStr(I) + ' ops/sec');386 Application.ProcessMessages;387 388 I := 0;389 StartTime := Now;390 repeat391 R := Dictionary.Items[I mod Dictionary.Count].Value;392 I := I + 1;393 until (Now - StartTime) > OneSecond;394 WriteLn('Values by index: ' + IntToStr(I) + ' ops/sec');395 Application.ProcessMessages;396 finally397 Dictionary.Free;398 end;399 400 try401 382 Dictionary2 := TStringList.Create; 402 383 Dictionary2.NameValueSeparator := '|'; 403 WriteLn; 404 WriteLn('TStringList...'); 384 385 I := 0; 386 StartTime := Now; 387 repeat 388 Dictionary.Add(IntToStr(I), IntToStr(I)); 389 I := I + 1; 390 until (Now - StartTime) > OneSecond; 391 WriteOutput('TDictionaryStringString.Add', IntToStr(Dictionary.Count) + ' ops/sec'); 392 Application.ProcessMessages; 393 405 394 I := 0; 406 395 StartTime := Now; … … 409 398 I := I + 1; 410 399 until (Now - StartTime) > OneSecond; 411 WriteLn('Add pair: ' + IntToStr(Dictionary2.Count) + ' ops/sec'); 400 WriteOutput('TStringList.Add', IntToStr(Dictionary2.Count) + ' ops/sec'); 401 Application.ProcessMessages; 402 403 I := 0; 404 StartTime := Now; 405 repeat 406 R := Dictionary.Values[IntToStr(I mod Dictionary.Count)]; 407 I := I + 1; 408 until (Now - StartTime) > OneSecond; 409 WriteOutput('TDictionaryStringString.Values', IntToStr(I) + ' ops/sec'); 412 410 Application.ProcessMessages; 413 411 … … 418 416 I := I + 1; 419 417 until (Now - StartTime) > OneSecond; 420 WriteLn('Values: ' + IntToStr(I) + ' ops/sec'); 418 WriteOutput('TStringList.Values', IntToStr(I) + ' ops/sec'); 419 Application.ProcessMessages; 420 421 I := 0; 422 StartTime := Now; 423 repeat 424 R := Dictionary.Keys[I mod Dictionary.Count]; 425 I := I + 1; 426 until (Now - StartTime) > OneSecond; 427 WriteOutput('TDictionaryStringString.Keys', IntToStr(I) + ' ops/sec'); 421 428 Application.ProcessMessages; 422 429 … … 427 434 I := I + 1; 428 435 until (Now - StartTime) > OneSecond; 429 WriteLn('Keys: ' + IntToStr(I) + ' ops/sec'); 436 WriteOutput('TStringList.Keys(Names)', IntToStr(I) + ' ops/sec'); 437 Application.ProcessMessages; 438 439 I := 0; 440 StartTime := Now; 441 repeat 442 R := Dictionary.Items[I mod Dictionary.Count].Value; 443 I := I + 1; 444 until (Now - StartTime) > OneSecond; 445 WriteOutput('TDictionaryStringString.Items', IntToStr(I) + ' ops/sec'); 430 446 Application.ProcessMessages; 431 447 … … 436 452 I := I + 1; 437 453 until (Now - StartTime) > OneSecond; 438 WriteLn('Values by index: ' + IntToStr(I) + ' ops/sec'); 439 Application.ProcessMessages; 440 finally 454 WriteOutput('TStringList.Items(ValueFromIndex)', IntToStr(I) + ' ops/sec'); 455 Application.ProcessMessages; 456 457 finally 458 Dictionary.Free; 441 459 Dictionary2.Free; 442 460 end; … … 452 470 List: TListString; 453 471 begin 454 MemoOutput.Clear;455 Write Ln('TListString test');472 ListViewOutput.Clear; 473 WriteOutput('TListString test'); 456 474 List := TListString.Create; 457 475 with List do try 458 476 AddArray(['One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven']); 459 Write Ln('Count: ' +IntToStr(Count));460 Write Ln('Implode: ' +Implode(',', StrToStr));461 Write Ln('Reverse');477 WriteOutput('Count', IntToStr(Count)); 478 WriteOutput('Implode', Implode(',', StrToStr)); 479 WriteOutput('Reverse'); 462 480 Reverse; 463 Write Ln('Implode: ' +Implode(',', StrToStr));464 Write Ln('First: ' +First);465 Write Ln('Last: ' +Last);481 WriteOutput('Implode', Implode(',', StrToStr)); 482 WriteOutput('First', First); 483 WriteOutput('Last', Last); 466 484 MoveItems(2, 3, 3); 467 Write Ln('Implode: ' +Implode(',', StrToStr));485 WriteOutput('Implode', Implode(',', StrToStr)); 468 486 finally 469 487 Free; … … 475 493 end; 476 494 477 procedure TMainForm.WriteLn(Text: string = ''); 478 begin 479 MemoOutput.Lines.Add(Text); 495 procedure TMainForm.WriteOutput(Text1: string = ''; Text2: string = ''); 496 var 497 NewItem: TListItem; 498 begin 499 NewItem := ListViewOutput.Items.Add; 500 NewItem.Caption := Text1; 501 NewItem.SubItems.Add(Text2); 480 502 end; 481 503
Note:
See TracChangeset
for help on using the changeset viewer.