Changeset 270
- Timestamp:
- Aug 23, 2011, 10:04:27 AM (13 years ago)
- Location:
- Generics/TemplateGenerics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Demo/Demo.lpi
r220 r270 57 57 <EditorIndex Value="0"/> 58 58 <WindowIndex Value="0"/> 59 <TopLine Value=" 624"/>60 <CursorPos X=" 39" Y="628"/>59 <TopLine Value="71"/> 60 <CursorPos X="22" Y="90"/> 61 61 <UsageCount Value="233"/> 62 62 <Bookmarks Count="1"> 63 <Item0 X="65" Y="2 24" ID="2"/>63 <Item0 X="65" Y="233" ID="2"/> 64 64 </Bookmarks> 65 65 <Loaded Value="True"/> … … 312 312 <Unit32> 313 313 <Filename Value="../Generic/GenericList.inc"/> 314 <IsVisibleTab Value="True"/> 314 315 <EditorIndex Value="2"/> 315 316 <WindowIndex Value="0"/> 316 <TopLine Value=" 227"/>317 <CursorPos X=" 29" Y="238"/>317 <TopLine Value="359"/> 318 <CursorPos X="62" Y="376"/> 318 319 <UsageCount Value="107"/> 319 320 <Loaded Value="True"/> … … 418 419 <Unit46> 419 420 <Filename Value="../Generic/GenericMatrix.inc"/> 420 <IsVisibleTab Value="True"/> 421 <EditorIndex Value="7"/> 421 <EditorIndex Value="3"/> 422 422 <WindowIndex Value="0"/> 423 423 <TopLine Value="9"/> 424 <CursorPos X=" 31" Y="19"/>424 <CursorPos X="28" Y="23"/> 425 425 <UsageCount Value="103"/> 426 426 <Loaded Value="True"/> 427 427 </Unit46> 428 428 <Unit47> 429 <Filename Value="../../../../ ../lazarus/trunk/lcl/graphics.pp"/>429 <Filename Value="../../../../lazarus/trunk/lcl/graphics.pp"/> 430 430 <UnitName Value="Graphics"/> 431 431 <WindowIndex Value="0"/> … … 436 436 </Unit47> 437 437 <Unit48> 438 <Filename Value="../../../../ ../lazarus/trunk/lcl/interfaces/carbon/issues.xml"/>438 <Filename Value="../../../../lazarus/trunk/lcl/interfaces/carbon/issues.xml"/> 439 439 <WindowIndex Value="0"/> 440 440 <TopLine Value="94"/> … … 492 492 </Unit54> 493 493 <Unit55> 494 <Filename Value="../../../../ ../lazarus/trunk/lcl/include/control.inc"/>494 <Filename Value="../../../../lazarus/trunk/lcl/include/control.inc"/> 495 495 <WindowIndex Value="0"/> 496 496 <TopLine Value="2270"/> … … 502 502 <Filename Value="../Specialized/SpecializedMatrix.pas"/> 503 503 <UnitName Value="SpecializedMatrix"/> 504 <EditorIndex Value=" 8"/>504 <EditorIndex Value="4"/> 505 505 <WindowIndex Value="0"/> 506 506 <TopLine Value="1"/> … … 518 518 </Unit57> 519 519 <Unit58> 520 <Filename Value="../../../../ ../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/dateutil.inc"/>520 <Filename Value="../../../../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/dateutil.inc"/> 521 521 <WindowIndex Value="0"/> 522 522 <TopLine Value="38"/> … … 526 526 </Unit58> 527 527 <Unit59> 528 <Filename Value="../../../../ ../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/classes/classesh.inc"/>528 <Filename Value="../../../../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/classes/classesh.inc"/> 529 529 <WindowIndex Value="0"/> 530 530 <TopLine Value="649"/> … … 534 534 </Unit59> 535 535 <Unit60> 536 <Filename Value="../../../../ ../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/classes/stringl.inc"/>536 <Filename Value="../../../../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/classes/stringl.inc"/> 537 537 <WindowIndex Value="0"/> 538 538 <TopLine Value="1185"/> … … 542 542 </Unit60> 543 543 <Unit61> 544 <Filename Value="../../../../ ../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/types.pp"/>544 <Filename Value="../../../../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/types.pp"/> 545 545 <UnitName Value="types"/> 546 546 <WindowIndex Value="0"/> … … 551 551 </Unit61> 552 552 <Unit62> 553 <Filename Value="../../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/objpas/sysutils/sysstrh.inc"/> 554 <EditorIndex Value="3"/> 553 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/objpas/sysutils/sysstrh.inc"/> 555 554 <WindowIndex Value="0"/> 556 555 <TopLine Value="71"/> 557 556 <CursorPos X="10" Y="84"/> 558 557 <UsageCount Value="10"/> 559 <Loaded Value="True"/>560 558 </Unit62> 561 559 <Unit63> 562 <Filename Value="../../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/objpas/sysutils/sysstr.inc"/> 563 <EditorIndex Value="4"/> 560 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/objpas/sysutils/sysstr.inc"/> 564 561 <WindowIndex Value="0"/> 565 562 <TopLine Value="148"/> 566 563 <CursorPos X="11" Y="169"/> 567 564 <UsageCount Value="10"/> 568 <Loaded Value="True"/>569 565 </Unit63> 570 566 <Unit64> 571 <Filename Value="../../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/inc/systemh.inc"/> 572 <EditorIndex Value="5"/> 567 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/inc/systemh.inc"/> 573 568 <WindowIndex Value="0"/> 574 569 <TopLine Value="511"/> 575 570 <CursorPos X="11" Y="524"/> 576 571 <UsageCount Value="10"/> 577 <Loaded Value="True"/>578 572 </Unit64> 579 573 <Unit65> 580 <Filename Value="../../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/i386/i386.inc"/> 581 <EditorIndex Value="6"/> 574 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/i386/i386.inc"/> 582 575 <WindowIndex Value="0"/> 583 576 <TopLine Value="411"/> 584 577 <CursorPos X="10" Y="424"/> 585 578 <UsageCount Value="10"/> 586 <Loaded Value="True"/>587 579 </Unit65> 588 580 </Units> 589 581 <JumpHistory Count="30" HistoryIndex="27"> 590 582 <Position1> 591 <Filename Value=" UMainForm.pas"/>592 <Caret Line=" 617" Column="1" TopLine="593"/>583 <Filename Value="../Generic/GenericList.inc"/> 584 <Caret Line="468" Column="70" TopLine="462"/> 593 585 </Position1> 594 586 <Position2> 595 <Filename Value=" UMainForm.pas"/>596 <Caret Line=" 260" Column="25" TopLine="230"/>587 <Filename Value="../Generic/GenericList.inc"/> 588 <Caret Line="469" Column="1" TopLine="462"/> 597 589 </Position2> 598 590 <Position3> 599 <Filename Value=" UMainForm.pas"/>600 <Caret Line=" 246" Column="21" TopLine="233"/>591 <Filename Value="../Generic/GenericList.inc"/> 592 <Caret Line="470" Column="1" TopLine="462"/> 601 593 </Position3> 602 594 <Position4> 603 <Filename Value=" UMainForm.pas"/>604 <Caret Line=" 364" Column="25" TopLine="358"/>595 <Filename Value="../Generic/GenericList.inc"/> 596 <Caret Line="471" Column="1" TopLine="462"/> 605 597 </Position4> 606 598 <Position5> 607 <Filename Value=" UMainForm.pas"/>608 <Caret Line=" 596" Column="33" TopLine="586"/>599 <Filename Value="../Generic/GenericList.inc"/> 600 <Caret Line="470" Column="5" TopLine="462"/> 609 601 </Position5> 610 602 <Position6> … … 613 605 </Position6> 614 606 <Position7> 615 <Filename Value=" ../Generic/GenericList.inc"/>616 <Caret Line=" 468" Column="70" TopLine="462"/>607 <Filename Value="UMainForm.pas"/> 608 <Caret Line="237" Column="19" TopLine="232"/> 617 609 </Position7> 618 610 <Position8> 619 <Filename Value=" ../Generic/GenericList.inc"/>620 <Caret Line="4 69" Column="1" TopLine="462"/>611 <Filename Value="UMainForm.pas"/> 612 <Caret Line="495" Column="26" TopLine="482"/> 621 613 </Position8> 622 614 <Position9> 623 <Filename Value=" ../Generic/GenericList.inc"/>624 <Caret Line=" 470" Column="1" TopLine="462"/>615 <Filename Value="UMainForm.pas"/> 616 <Caret Line="503" Column="9" TopLine="490"/> 625 617 </Position9> 626 618 <Position10> 627 <Filename Value=" ../Generic/GenericList.inc"/>628 <Caret Line="4 71" Column="1" TopLine="462"/>619 <Filename Value="UMainForm.pas"/> 620 <Caret Line="480" Column="3" TopLine="467"/> 629 621 </Position10> 630 622 <Position11> 631 <Filename Value=" ../Generic/GenericList.inc"/>632 <Caret Line=" 470" Column="5" TopLine="462"/>623 <Filename Value="UMainForm.pas"/> 624 <Caret Line="511" Column="32" TopLine="498"/> 633 625 </Position11> 634 626 <Position12> 635 627 <Filename Value="UMainForm.pas"/> 636 <Caret Line=" 237" Column="19" TopLine="232"/>628 <Caret Line="519" Column="33" TopLine="506"/> 637 629 </Position12> 638 630 <Position13> 639 631 <Filename Value="UMainForm.pas"/> 640 <Caret Line=" 237" Column="19" TopLine="232"/>632 <Caret Line="526" Column="26" TopLine="513"/> 641 633 </Position13> 642 634 <Position14> 643 635 <Filename Value="UMainForm.pas"/> 644 <Caret Line=" 495" Column="26" TopLine="482"/>636 <Caret Line="538" Column="27" TopLine="525"/> 645 637 </Position14> 646 638 <Position15> 647 639 <Filename Value="UMainForm.pas"/> 648 <Caret Line="5 03" Column="9" TopLine="490"/>640 <Caret Line="549" Column="26" TopLine="536"/> 649 641 </Position15> 650 642 <Position16> 651 643 <Filename Value="UMainForm.pas"/> 652 <Caret Line=" 480" Column="3" TopLine="467"/>644 <Caret Line="561" Column="25" TopLine="548"/> 653 645 </Position16> 654 646 <Position17> 655 647 <Filename Value="UMainForm.pas"/> 656 <Caret Line="5 11" Column="32" TopLine="498"/>648 <Caret Line="572" Column="16" TopLine="559"/> 657 649 </Position17> 658 650 <Position18> 659 651 <Filename Value="UMainForm.pas"/> 660 <Caret Line="5 19" Column="33" TopLine="506"/>652 <Caret Line="584" Column="25" TopLine="571"/> 661 653 </Position18> 662 654 <Position19> 663 655 <Filename Value="UMainForm.pas"/> 664 <Caret Line="5 26" Column="26" TopLine="513"/>656 <Caret Line="595" Column="26" TopLine="582"/> 665 657 </Position19> 666 658 <Position20> 667 <Filename Value=" UMainForm.pas"/>668 <Caret Line=" 538" Column="27" TopLine="525"/>659 <Filename Value="../Generic/GenericList.inc"/> 660 <Caret Line="214" Column="12" TopLine="201"/> 669 661 </Position20> 670 662 <Position21> 671 <Filename Value=" UMainForm.pas"/>672 <Caret Line=" 549" Column="26" TopLine="536"/>663 <Filename Value="../Generic/GenericList.inc"/> 664 <Caret Line="231" Column="16" TopLine="218"/> 673 665 </Position21> 674 666 <Position22> 675 667 <Filename Value="UMainForm.pas"/> 676 <Caret Line=" 561" Column="25" TopLine="548"/>668 <Caret Line="634" Column="11" TopLine="614"/> 677 669 </Position22> 678 670 <Position23> 679 671 <Filename Value="UMainForm.pas"/> 680 <Caret Line=" 572" Column="16" TopLine="559"/>672 <Caret Line="628" Column="39" TopLine="624"/> 681 673 </Position23> 682 674 <Position24> 683 675 <Filename Value="UMainForm.pas"/> 684 <Caret Line=" 584" Column="25" TopLine="571"/>676 <Caret Line="91" Column="5" TopLine="77"/> 685 677 </Position24> 686 678 <Position25> 687 679 <Filename Value="UMainForm.pas"/> 688 <Caret Line=" 595" Column="26" TopLine="582"/>680 <Caret Line="92" Column="61" TopLine="77"/> 689 681 </Position25> 690 682 <Position26> 691 <Filename Value=" ../Generic/GenericList.inc"/>692 <Caret Line=" 214" Column="12" TopLine="201"/>683 <Filename Value="UMainForm.pas"/> 684 <Caret Line="91" Column="52" TopLine="74"/> 693 685 </Position26> 694 686 <Position27> 695 687 <Filename Value="../Generic/GenericList.inc"/> 696 <Caret Line=" 231" Column="16" TopLine="218"/>688 <Caret Line="3" Column="69" TopLine="1"/> 697 689 </Position27> 698 690 <Position28> 699 <Filename Value=" UMainForm.pas"/>700 <Caret Line=" 634" Column="11" TopLine="614"/>691 <Filename Value="../Generic/GenericList.inc"/> 692 <Caret Line="27" Column="24" TopLine="7"/> 701 693 </Position28> 702 694 <Position29> 703 <Filename Value=" UMainForm.pas"/>704 <Caret Line=" 479" Column="12" TopLine="467"/>695 <Filename Value="../Generic/GenericList.inc"/> 696 <Caret Line="217" Column="27" TopLine="209"/> 705 697 </Position29> 706 698 <Position30> 707 699 <Filename Value="../Generic/GenericList.inc"/> 708 <Caret Line="23 " Column="58" TopLine="9"/>700 <Caret Line="237" Column="18" TopLine="223"/> 709 701 </Position30> 710 702 </JumpHistory> -
Generics/TemplateGenerics/Demo/UMainForm.lfm
r257 r270 125 125 Height = 14 126 126 Top = 408 127 Width = 72127 Width = 62 128 128 Anchors = [akLeft, akBottom] 129 129 Caption = 'Benchmarks:' -
Generics/TemplateGenerics/Demo/UMainForm.pas
r219 r270 65 65 var 66 66 List: TListInteger; 67 List2: TListInteger; 67 68 I: Integer; 68 69 begin … … 70 71 LabelTestName.Caption := 'TListInteger test'; 71 72 List := TListInteger.Create; 73 List2 := TListInteger.Create; 72 74 with List do try 73 75 AddArray([10, 20, 30, 40]); … … 86 88 Insert(5, 11); 87 89 WriteOutput('Insert(5, 11)', Implode(',', IntToStr)); 90 DeleteItems(0, 10); 91 WriteOutput('Delete(0, 10)', Implode(',', IntToStr)); 92 List2.SetArray([1, 0]); 93 WriteOutput('EqualTo([6, 11])', BoolToStr(EqualTo(List2))); 94 List2.SetArray([2, 0]); 95 WriteOutput('EqualTo([7, 11])', BoolToStr(EqualTo(List2))); 88 96 finally 89 97 Free; 98 List2.Free; 90 99 end; 91 100 end; -
Generics/TemplateGenerics/Generic/GenericList.inc
r251 r270 374 374 I := 0; 375 375 while I < Count do begin 376 if not CompareMem( Addr(FItems[I]), Addr(List.FItems[I]), SizeOf(TGListItem)) then begin376 if not CompareMem(@FItems[I], @List.FItems[I], SizeOf(TGListItem)) then begin 377 377 Result := False; 378 378 Break;
Note:
See TracChangeset
for help on using the changeset viewer.