Changeset 326
- Timestamp:
- Feb 8, 2012, 2:13:08 PM (13 years ago)
- Location:
- Generics/NativeGenerics
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/NativeGenerics/Demo/Demo.lpi
r324 r326 38 38 </Item2> 39 39 </RequiredPackages> 40 <Units Count=" 69">40 <Units Count="71"> 41 41 <Unit0> 42 42 <Filename Value="Demo.lpr"/> 43 43 <IsPartOfProject Value="True"/> 44 44 <UnitName Value="Demo"/> 45 <EditorIndex Value="1 7"/>45 <EditorIndex Value="19"/> 46 46 <WindowIndex Value="0"/> 47 47 <TopLine Value="1"/> … … 57 57 <ResourceBaseClass Value="Form"/> 58 58 <UnitName Value="UMainForm"/> 59 <IsVisibleTab Value="True"/> 59 60 <EditorIndex Value="0"/> 60 61 <WindowIndex Value="0"/> 61 <TopLine Value=" 166"/>62 <CursorPos X=" 1" Y="179"/>62 <TopLine Value="753"/> 63 <CursorPos X="3" Y="765"/> 63 64 <UsageCount Value="233"/> 64 65 <Bookmarks Count="1"> 65 <Item0 X="65" Y="27 5" ID="2"/>66 <Item0 X="65" Y="277" ID="2"/> 66 67 </Bookmarks> 67 68 <Loaded Value="True"/> … … 75 76 <TopLine Value="47"/> 76 77 <CursorPos X="20" Y="60"/> 77 <UsageCount Value=" 5"/>78 <UsageCount Value="4"/> 78 79 <DefaultSyntaxHighlighter Value="Delphi"/> 79 80 </Unit2> … … 83 84 <TopLine Value="1"/> 84 85 <CursorPos X="25" Y="13"/> 85 <UsageCount Value=" 10"/>86 <UsageCount Value="9"/> 86 87 <DefaultSyntaxHighlighter Value="None"/> 87 88 </Unit3> … … 91 92 <TopLine Value="1"/> 92 93 <CursorPos X="21" Y="4"/> 93 <UsageCount Value=" 1"/>94 <UsageCount Value="0"/> 94 95 <DefaultSyntaxHighlighter Value="None"/> 95 96 </Unit4> … … 100 101 <TopLine Value="1"/> 101 102 <CursorPos X="1" Y="25"/> 102 <UsageCount Value=" 1"/>103 <UsageCount Value="0"/> 103 104 <DefaultSyntaxHighlighter Value="Delphi"/> 104 105 </Unit5> … … 108 109 <TopLine Value="1"/> 109 110 <CursorPos X="1" Y="3"/> 110 <UsageCount Value=" 1"/>111 <UsageCount Value="0"/> 111 112 <DefaultSyntaxHighlighter Value="None"/> 112 113 </Unit6> … … 116 117 <TopLine Value="1"/> 117 118 <CursorPos X="7" Y="4"/> 118 <UsageCount Value=" 1"/>119 <UsageCount Value="0"/> 119 120 <DefaultSyntaxHighlighter Value="None"/> 120 121 </Unit7> … … 125 126 <TopLine Value="1"/> 126 127 <CursorPos X="14" Y="15"/> 127 <UsageCount Value=" 1"/>128 <UsageCount Value="0"/> 128 129 <DefaultSyntaxHighlighter Value="Delphi"/> 129 130 </Unit8> … … 133 134 <TopLine Value="1"/> 134 135 <CursorPos X="14" Y="18"/> 135 <UsageCount Value=" 1"/>136 <UsageCount Value="0"/> 136 137 <DefaultSyntaxHighlighter Value="None"/> 137 138 </Unit9> … … 142 143 <TopLine Value="2"/> 143 144 <CursorPos X="30" Y="8"/> 144 <UsageCount Value=" 1"/>145 <UsageCount Value="0"/> 145 146 <DefaultSyntaxHighlighter Value="Delphi"/> 146 147 </Unit10> … … 151 152 <TopLine Value="13"/> 152 153 <CursorPos X="15" Y="12"/> 153 <UsageCount Value=" 3"/>154 <UsageCount Value="2"/> 154 155 <DefaultSyntaxHighlighter Value="Delphi"/> 155 156 </Unit11> … … 159 160 <TopLine Value="359"/> 160 161 <CursorPos X="62" Y="376"/> 161 <UsageCount Value="10 2"/>162 <UsageCount Value="101"/> 162 163 <DefaultSyntaxHighlighter Value="Delphi"/> 163 164 </Unit12> … … 167 168 <TopLine Value="31"/> 168 169 <CursorPos X="44" Y="47"/> 169 <UsageCount Value="8 9"/>170 <UsageCount Value="88"/> 170 171 <DefaultSyntaxHighlighter Value="Delphi"/> 171 172 </Unit13> … … 175 176 <TopLine Value="1"/> 176 177 <CursorPos X="36" Y="48"/> 177 <UsageCount Value="8 9"/>178 <UsageCount Value="88"/> 178 179 <DefaultSyntaxHighlighter Value="Delphi"/> 179 180 </Unit14> … … 183 184 <TopLine Value="3"/> 184 185 <CursorPos X="1" Y="3"/> 185 <UsageCount Value="8 9"/>186 <UsageCount Value="88"/> 186 187 <DefaultSyntaxHighlighter Value="Delphi"/> 187 188 </Unit15> … … 191 192 <TopLine Value="11"/> 192 193 <CursorPos X="42" Y="11"/> 193 <UsageCount Value="8 9"/>194 <UsageCount Value="88"/> 194 195 <DefaultSyntaxHighlighter Value="Delphi"/> 195 196 </Unit16> … … 199 200 <TopLine Value="3"/> 200 201 <CursorPos X="1" Y="3"/> 201 <UsageCount Value="8 9"/>202 <UsageCount Value="88"/> 202 203 <DefaultSyntaxHighlighter Value="Delphi"/> 203 204 </Unit17> … … 207 208 <TopLine Value="1"/> 208 209 <CursorPos X="22" Y="30"/> 209 <UsageCount Value="8 9"/>210 <UsageCount Value="88"/> 210 211 <DefaultSyntaxHighlighter Value="Delphi"/> 211 212 </Unit18> … … 216 217 <TopLine Value="6"/> 217 218 <CursorPos X="56" Y="36"/> 218 <UsageCount Value="8 8"/>219 <UsageCount Value="87"/> 219 220 <DefaultSyntaxHighlighter Value="Delphi"/> 220 221 </Unit19> … … 225 226 <TopLine Value="27"/> 226 227 <CursorPos X="50" Y="59"/> 227 <UsageCount Value="8 7"/>228 <UsageCount Value="86"/> 228 229 <DefaultSyntaxHighlighter Value="Delphi"/> 229 230 </Unit20> … … 234 235 <TopLine Value="57"/> 235 236 <CursorPos X="48" Y="85"/> 236 <UsageCount Value="8 7"/>237 <UsageCount Value="86"/> 237 238 <DefaultSyntaxHighlighter Value="Delphi"/> 238 239 </Unit21> … … 242 243 <TopLine Value="1"/> 243 244 <CursorPos X="33" Y="14"/> 244 <UsageCount Value="8 7"/>245 <UsageCount Value="86"/> 245 246 <DefaultSyntaxHighlighter Value="Delphi"/> 246 247 </Unit22> … … 251 252 <TopLine Value="52"/> 252 253 <CursorPos X="1" Y="81"/> 253 <UsageCount Value="8 7"/>254 <UsageCount Value="86"/> 254 255 <DefaultSyntaxHighlighter Value="Delphi"/> 255 256 </Unit23> … … 260 261 <TopLine Value="29"/> 261 262 <CursorPos X="1" Y="62"/> 262 <UsageCount Value="8 7"/>263 <UsageCount Value="86"/> 263 264 <DefaultSyntaxHighlighter Value="Delphi"/> 264 265 </Unit24> … … 269 270 <TopLine Value="9"/> 270 271 <CursorPos X="60" Y="36"/> 271 <UsageCount Value="8 6"/>272 <UsageCount Value="85"/> 272 273 <DefaultSyntaxHighlighter Value="Delphi"/> 273 274 </Unit25> … … 277 278 <TopLine Value="9"/> 278 279 <CursorPos X="28" Y="23"/> 279 <UsageCount Value="9 8"/>280 <UsageCount Value="97"/> 280 281 <DefaultSyntaxHighlighter Value="Delphi"/> 281 282 </Unit26> … … 286 287 <TopLine Value="2624"/> 287 288 <CursorPos X="37" Y="2636"/> 288 <UsageCount Value="8 5"/>289 <UsageCount Value="84"/> 289 290 <DefaultSyntaxHighlighter Value="Delphi"/> 290 291 </Unit27> … … 294 295 <TopLine Value="94"/> 295 296 <CursorPos X="1" Y="1"/> 296 <UsageCount Value=" 1"/>297 <UsageCount Value="0"/> 297 298 <DefaultSyntaxHighlighter Value="XML"/> 298 299 </Unit28> … … 302 303 <TopLine Value="199"/> 303 304 <CursorPos X="14" Y="213"/> 304 <UsageCount Value="2 3"/>305 <UsageCount Value="22"/> 305 306 <DefaultSyntaxHighlighter Value="Delphi"/> 306 307 </Unit29> … … 310 311 <TopLine Value="199"/> 311 312 <CursorPos X="3" Y="201"/> 312 <UsageCount Value="2 3"/>313 <UsageCount Value="22"/> 313 314 <DefaultSyntaxHighlighter Value="Delphi"/> 314 315 </Unit30> … … 318 319 <TopLine Value="1"/> 319 320 <CursorPos X="21" Y="20"/> 320 <UsageCount Value="1 4"/>321 <UsageCount Value="13"/> 321 322 <DefaultSyntaxHighlighter Value="Delphi"/> 322 323 </Unit31> … … 327 328 <TopLine Value="1"/> 328 329 <CursorPos X="27" Y="26"/> 329 <UsageCount Value="2 3"/>330 <UsageCount Value="22"/> 330 331 <DefaultSyntaxHighlighter Value="Delphi"/> 331 332 </Unit32> … … 335 336 <TopLine Value="381"/> 336 337 <CursorPos X="3" Y="398"/> 337 <UsageCount Value="2 3"/>338 <UsageCount Value="22"/> 338 339 <DefaultSyntaxHighlighter Value="Delphi"/> 339 340 </Unit33> … … 343 344 <TopLine Value="475"/> 344 345 <CursorPos X="10" Y="503"/> 345 <UsageCount Value=" 2"/>346 <UsageCount Value="1"/> 346 347 <DefaultSyntaxHighlighter Value="Delphi"/> 347 348 </Unit34> … … 351 352 <TopLine Value="2270"/> 352 353 <CursorPos X="22" Y="2273"/> 353 <UsageCount Value="1 4"/>354 <UsageCount Value="13"/> 354 355 <DefaultSyntaxHighlighter Value="Delphi"/> 355 356 </Unit35> … … 360 361 <TopLine Value="1"/> 361 362 <CursorPos X="25" Y="41"/> 362 <UsageCount Value="1 4"/>363 <UsageCount Value="13"/> 363 364 <DefaultSyntaxHighlighter Value="Delphi"/> 364 365 </Unit36> … … 368 369 <TopLine Value="1"/> 369 370 <CursorPos X="28" Y="10"/> 370 <UsageCount Value=" 4"/>371 <UsageCount Value="3"/> 371 372 <DefaultSyntaxHighlighter Value="None"/> 372 373 </Unit37> … … 376 377 <TopLine Value="38"/> 377 378 <CursorPos X="3" Y="50"/> 378 <UsageCount Value=" 6"/>379 <UsageCount Value="5"/> 379 380 <DefaultSyntaxHighlighter Value="Delphi"/> 380 381 </Unit38> … … 384 385 <TopLine Value="649"/> 385 386 <CursorPos X="38" Y="671"/> 386 <UsageCount Value=" 5"/>387 <UsageCount Value="4"/> 387 388 <DefaultSyntaxHighlighter Value="Delphi"/> 388 389 </Unit39> … … 392 393 <TopLine Value="1185"/> 393 394 <CursorPos X="22" Y="1196"/> 394 <UsageCount Value=" 5"/>395 <UsageCount Value="4"/> 395 396 <DefaultSyntaxHighlighter Value="Delphi"/> 396 397 </Unit40> … … 401 402 <TopLine Value="112"/> 402 403 <CursorPos X="3" Y="124"/> 403 <UsageCount Value=" 5"/>404 <UsageCount Value="4"/> 404 405 <DefaultSyntaxHighlighter Value="Delphi"/> 405 406 </Unit41> … … 409 410 <TopLine Value="71"/> 410 411 <CursorPos X="10" Y="84"/> 411 <UsageCount Value=" 5"/>412 <UsageCount Value="4"/> 412 413 <DefaultSyntaxHighlighter Value="Delphi"/> 413 414 </Unit42> … … 417 418 <TopLine Value="148"/> 418 419 <CursorPos X="11" Y="169"/> 419 <UsageCount Value=" 5"/>420 <UsageCount Value="4"/> 420 421 <DefaultSyntaxHighlighter Value="Delphi"/> 421 422 </Unit43> … … 425 426 <TopLine Value="511"/> 426 427 <CursorPos X="11" Y="524"/> 427 <UsageCount Value=" 5"/>428 <UsageCount Value="4"/> 428 429 <DefaultSyntaxHighlighter Value="Delphi"/> 429 430 </Unit44> … … 433 434 <TopLine Value="411"/> 434 435 <CursorPos X="10" Y="424"/> 435 <UsageCount Value=" 5"/>436 <UsageCount Value="4"/> 436 437 <DefaultSyntaxHighlighter Value="Delphi"/> 437 438 </Unit45> … … 439 440 <Filename Value="../Units/GenericList.pas"/> 440 441 <UnitName Value="GenericList"/> 441 <EditorIndex Value="1 1"/>442 <WindowIndex Value="0"/> 443 <TopLine Value=" 7"/>444 <CursorPos X=" 3" Y="8"/>445 <UsageCount Value="4 0"/>442 <EditorIndex Value="13"/> 443 <WindowIndex Value="0"/> 444 <TopLine Value="666"/> 445 <CursorPos X="24" Y="691"/> 446 <UsageCount Value="41"/> 446 447 <Loaded Value="True"/> 447 448 </Unit46> … … 449 450 <Filename Value="../Units/GenericMatrix.pas"/> 450 451 <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"/> 457 457 <Loaded Value="True"/> 458 458 </Unit47> … … 460 460 <Filename Value="../Units/GenericStream.pas"/> 461 461 <UnitName Value="GenericStream"/> 462 <EditorIndex Value=" 9"/>462 <EditorIndex Value="11"/> 463 463 <WindowIndex Value="0"/> 464 464 <TopLine Value="34"/> 465 465 <CursorPos X="18" Y="48"/> 466 <UsageCount Value="1 8"/>466 <UsageCount Value="19"/> 467 467 <Loaded Value="True"/> 468 468 </Unit48> … … 473 473 <TopLine Value="18"/> 474 474 <CursorPos X="24" Y="28"/> 475 <UsageCount Value="1 3"/>475 <UsageCount Value="12"/> 476 476 </Unit49> 477 477 <Unit50> 478 478 <Filename Value="../Units/GenericDictionary.pas"/> 479 479 <UnitName Value="GenericDictionary"/> 480 <EditorIndex Value="1 5"/>480 <EditorIndex Value="17"/> 481 481 <WindowIndex Value="0"/> 482 482 <TopLine Value="1"/> 483 483 <CursorPos X="1" Y="1"/> 484 <UsageCount Value=" 19"/>484 <UsageCount Value="20"/> 485 485 <Loaded Value="True"/> 486 486 </Unit50> 487 487 <Unit51> 488 488 <Filename Value="../../../../../Lazarus/0.9.31_2.6.0/fpc/2.6.0/source/rtl/objpas/sysutils/sysunih.inc"/> 489 <EditorIndex Value="1 4"/>489 <EditorIndex Value="16"/> 490 490 <WindowIndex Value="0"/> 491 491 <TopLine Value="9"/> 492 492 <CursorPos X="10" Y="22"/> 493 <UsageCount Value=" 19"/>493 <UsageCount Value="20"/> 494 494 <Loaded Value="True"/> 495 495 <DefaultSyntaxHighlighter Value="Delphi"/> … … 498 498 <Filename Value="../Units/SpecializedList.pas"/> 499 499 <UnitName Value="SpecializedList"/> 500 <EditorIndex Value=" 18"/>500 <EditorIndex Value="20"/> 501 501 <WindowIndex Value="0"/> 502 502 <TopLine Value="45"/> 503 503 <CursorPos X="1" Y="68"/> 504 <UsageCount Value=" 19"/>504 <UsageCount Value="20"/> 505 505 <Loaded Value="True"/> 506 506 </Unit52> 507 507 <Unit53> 508 508 <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/fpc/2.7.1/source/rtl/objpas/classes/classesh.inc"/> 509 <EditorIndex Value="1 0"/>509 <EditorIndex Value="12"/> 510 510 <WindowIndex Value="0"/> 511 511 <TopLine Value="257"/> 512 512 <CursorPos X="3" Y="270"/> 513 <UsageCount Value="1 6"/>513 <UsageCount Value="17"/> 514 514 <Loaded Value="True"/> 515 515 </Unit53> … … 520 520 <TopLine Value="1"/> 521 521 <CursorPos X="1" Y="1"/> 522 <UsageCount Value="1 3"/>522 <UsageCount Value="12"/> 523 523 </Unit54> 524 524 <Unit55> … … 528 528 <TopLine Value="22"/> 529 529 <CursorPos X="14" Y="38"/> 530 <UsageCount Value="1 3"/>530 <UsageCount Value="12"/> 531 531 </Unit55> 532 532 <Unit56> 533 533 <Filename Value="../Units/GenericRange.pas"/> 534 534 <UnitName Value="GenericRange"/> 535 <EditorIndex Value="1 2"/>535 <EditorIndex Value="14"/> 536 536 <WindowIndex Value="0"/> 537 537 <TopLine Value="4"/> 538 <CursorPos X=" 33" Y="8"/>539 <UsageCount Value=" 19"/>538 <CursorPos X="6" Y="16"/> 539 <UsageCount Value="20"/> 540 540 <Loaded Value="True"/> 541 541 </Unit56> … … 545 545 <TopLine Value="958"/> 546 546 <CursorPos X="11" Y="971"/> 547 <UsageCount Value="1 3"/>547 <UsageCount Value="12"/> 548 548 </Unit57> 549 549 <Unit58> 550 550 <Filename Value="../Units/GenericTree.pas"/> 551 551 <UnitName Value="GenericTree"/> 552 <EditorIndex Value="1 3"/>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"/> 557 557 <Loaded Value="True"/> 558 558 </Unit58> … … 560 560 <Filename Value="../Units/GenericString.pas"/> 561 561 <UnitName Value="GenericString"/> 562 <EditorIndex Value=" 19"/>562 <EditorIndex Value="21"/> 563 563 <WindowIndex Value="0"/> 564 564 <TopLine Value="35"/> 565 565 <CursorPos X="23" Y="40"/> 566 <UsageCount Value="1 2"/>566 <UsageCount Value="13"/> 567 567 <Loaded Value="True"/> 568 568 </Unit59> … … 570 570 <Filename Value="../Units/GenericBitmap.pas"/> 571 571 <UnitName Value="GenericBitmap"/> 572 <EditorIndex Value="2 0"/>572 <EditorIndex Value="22"/> 573 573 <WindowIndex Value="0"/> 574 574 <TopLine Value="22"/> 575 575 <CursorPos X="18" Y="46"/> 576 <UsageCount Value="1 1"/>576 <UsageCount Value="12"/> 577 577 <Loaded Value="True"/> 578 578 </Unit60> … … 580 580 <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/graphics.pp"/> 581 581 <UnitName Value="Graphics"/> 582 <EditorIndex Value=" 1"/>582 <EditorIndex Value="3"/> 583 583 <WindowIndex Value="0"/> 584 584 <TopLine Value="1151"/> 585 585 <CursorPos X="22" Y="1165"/> 586 <UsageCount Value="1 1"/>586 <UsageCount Value="12"/> 587 587 <Loaded Value="True"/> 588 588 </Unit61> 589 589 <Unit62> 590 590 <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/include/rasterimage.inc"/> 591 <EditorIndex Value=" 8"/>591 <EditorIndex Value="10"/> 592 592 <WindowIndex Value="0"/> 593 593 <TopLine Value="310"/> 594 594 <CursorPos X="22" Y="314"/> 595 <UsageCount Value="1 1"/>595 <UsageCount Value="12"/> 596 596 <Loaded Value="True"/> 597 597 </Unit62> 598 598 <Unit63> 599 599 <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/include/bitmapcanvas.inc"/> 600 <EditorIndex Value=" 7"/>600 <EditorIndex Value="9"/> 601 601 <WindowIndex Value="0"/> 602 602 <TopLine Value="53"/> 603 603 <CursorPos X="3" Y="46"/> 604 <UsageCount Value="1 1"/>604 <UsageCount Value="12"/> 605 605 <Loaded Value="True"/> 606 606 </Unit63> … … 608 608 <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/fpc/2.7.1/source/packages/fcl-image/src/fpcanvas.pp"/> 609 609 <UnitName Value="FPCanvas"/> 610 <EditorIndex Value=" 4"/>610 <EditorIndex Value="6"/> 611 611 <WindowIndex Value="0"/> 612 612 <TopLine Value="347"/> 613 613 <CursorPos X="15" Y="360"/> 614 <UsageCount Value="1 1"/>614 <UsageCount Value="12"/> 615 615 <Loaded Value="True"/> 616 616 </Unit64> 617 617 <Unit65> 618 618 <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"/> 620 620 <WindowIndex Value="0"/> 621 621 <TopLine Value="308"/> 622 622 <CursorPos X="3" Y="310"/> 623 <UsageCount Value="1 1"/>623 <UsageCount Value="12"/> 624 624 <Loaded Value="True"/> 625 625 </Unit65> 626 626 <Unit66> 627 627 <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"/> 629 629 <WindowIndex Value="0"/> 630 630 <TopLine Value="54"/> 631 631 <CursorPos X="3" Y="63"/> 632 <UsageCount Value="1 1"/>632 <UsageCount Value="12"/> 633 633 <Loaded Value="True"/> 634 634 </Unit66> 635 635 <Unit67> 636 636 <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/include/canvas.inc"/> 637 <EditorIndex Value=" 2"/>637 <EditorIndex Value="4"/> 638 638 <WindowIndex Value="0"/> 639 639 <TopLine Value="147"/> 640 640 <CursorPos X="3" Y="152"/> 641 <UsageCount Value="1 1"/>641 <UsageCount Value="12"/> 642 642 <Loaded Value="True"/> 643 643 </Unit67> … … 645 645 <Filename Value="../../../../../Lazarus/0.9.31_2.7.1/lcl/interfacebase.pp"/> 646 646 <UnitName Value="InterfaceBase"/> 647 <EditorIndex Value=" 3"/>647 <EditorIndex Value="5"/> 648 648 <WindowIndex Value="0"/> 649 649 <TopLine Value="153"/> 650 650 <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"/> 651 661 <UsageCount Value="11"/> 652 662 <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> 654 673 </Units> 655 674 <JumpHistory Count="30" HistoryIndex="29"> 656 675 <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"/> 659 678 </Position1> 660 679 <Position2> 661 <Filename Value=" ../../../../../Lazarus/0.9.31_2.7.1/lcl/graphics.pp"/>662 <Caret Line="1 008" Column="3" TopLine="995"/>680 <Filename Value="UMainForm.pas"/> 681 <Caret Line="138" Column="17" TopLine="125"/> 663 682 </Position2> 664 683 <Position3> 665 <Filename Value=" ../../../../../Lazarus/0.9.31_2.7.1/lcl/graphics.pp"/>666 <Caret Line="1 182" Column="17" TopLine="1169"/>684 <Filename Value="UMainForm.pas"/> 685 <Caret Line="143" Column="23" TopLine="130"/> 667 686 </Position3> 668 687 <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"/> 671 690 </Position4> 672 691 <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"/> 675 694 </Position5> 676 695 <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"/> 679 698 </Position6> 680 699 <Position7> 681 <Filename Value=" ../Units/GenericMatrix.pas"/>682 <Caret Line="1 3" Column="6" TopLine="18"/>700 <Filename Value="UMainForm.pas"/> 701 <Caret Line="160" Column="1" TopLine="137"/> 683 702 </Position7> 684 703 <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"/> 687 706 </Position8> 688 707 <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"/> 691 710 </Position9> 692 711 <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"/> 695 714 </Position10> 696 715 <Position11> 697 716 <Filename Value="UMainForm.pas"/> 698 <Caret Line=" 47" Column="1" TopLine="34"/>717 <Caret Line="801" Column="9" TopLine="782"/> 699 718 </Position11> 700 719 <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"/> 703 722 </Position12> 704 723 <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"/> 707 726 </Position13> 708 727 <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"/> 711 730 </Position14> 712 731 <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"/> 715 734 </Position15> 716 735 <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"/> 719 738 </Position16> 720 739 <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"/> 723 742 </Position17> 724 743 <Position18> 725 <Filename Value="../Units/Generic Matrix.pas"/>726 <Caret Line=" 67" Column="1" TopLine="46"/>744 <Filename Value="../Units/GenericTree.pas"/> 745 <Caret Line="52" Column="27" TopLine="16"/> 727 746 </Position18> 728 747 <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"/> 731 750 </Position19> 732 751 <Position20> 733 <Filename Value="../Units/Generic Matrix.pas"/>734 <Caret Line=" 181" Column="26" TopLine="168"/>752 <Filename Value="../Units/GenericTree.pas"/> 753 <Caret Line="42" Column="1" TopLine="20"/> 735 754 </Position20> 736 755 <Position21> 737 <Filename Value=" ../Units/GenericMatrix.pas"/>738 <Caret Line="5 3" Column="80" TopLine="40"/>756 <Filename Value="UMainForm.pas"/> 757 <Caret Line="56" Column="17" TopLine="16"/> 739 758 </Position21> 740 759 <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"/> 743 762 </Position22> 744 763 <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"/> 747 766 </Position23> 748 767 <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"/> 751 770 </Position24> 752 771 <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"/> 755 774 </Position25> 756 775 <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"/> 759 778 </Position26> 760 779 <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"/> 763 782 </Position27> 764 783 <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"/> 767 786 </Position28> 768 787 <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"/> 771 790 </Position29> 772 791 <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"/> 775 794 </Position30> 776 795 </JumpHistory> … … 827 846 <WatchKind Value="wpkWrite"/> 828 847 <Source Value="UMainForm.pas"/> 829 <Line Value="20 4"/>848 <Line Value="206"/> 830 849 </Item1> 831 850 </BreakPoints> -
Generics/NativeGenerics/Demo/UMainForm.lfm
r321 r326 4 4 Top = 104 5 5 Width = 692 6 ActiveControl = ButtonIntegerList6 ActiveControl = IntegerListButton 7 7 Caption = 'Template generics demo' 8 8 ClientHeight = 520 … … 11 11 OnDestroy = FormDestroy 12 12 LCLVersion = '0.9.31' 13 object ButtonIntegerList: TButton13 object IntegerListButton: TButton 14 14 Left = 8 15 15 Height = 25 16 16 Top = 8 17 Width = 1 2818 Caption = 'TList Integer'19 OnClick = ButtonIntegerListClick17 Width = 152 18 Caption = 'TList<Integer>' 19 OnClick = IntegerListButtonClick 20 20 TabOrder = 0 21 21 end 22 object ButtonStringList: TButton22 object StringListButton: TButton 23 23 Left = 8 24 24 Height = 25 25 25 Top = 40 26 Width = 1 2827 Caption = 'T ListString'28 OnClick = ButtonStringListClick26 Width = 152 27 Caption = 'TStringList<string>' 28 OnClick = StringListButtonClick 29 29 TabOrder = 1 30 30 end 31 object ButtonDictionaryString: TButton31 object DictionaryStringButton: TButton 32 32 Left = 8 33 33 Height = 25 34 34 Top = 72 35 Width = 1 2836 Caption = 'TDictionary String'37 OnClick = ButtonDictionaryStringClick35 Width = 152 36 Caption = 'TDictionary<string,string>' 37 OnClick = DictionaryStringButtonClick 38 38 TabOrder = 2 39 39 end 40 object ButtonQueueInteger: TButton40 object QueueIntegerButton: TButton 41 41 Left = 8 42 42 Height = 25 43 43 Top = 102 44 Width = 1 2845 Caption = 'TQueue Integer'46 OnClick = ButtonQueueIntegerClick44 Width = 152 45 Caption = 'TQueue<Integer>' 46 OnClick = QueueIntegerButtonClick 47 47 TabOrder = 3 48 48 end 49 object ButtonCharList: TButton49 object CharListButton: TButton 50 50 Left = 8 51 51 Height = 25 52 52 Top = 134 53 Width = 1 2854 Caption = 'T ListChar(TString)'55 OnClick = ButtonCharListClick53 Width = 152 54 Caption = 'TString<Char>' 55 OnClick = CharListButtonClick 56 56 TabOrder = 4 57 57 end … … 60 60 Height = 24 61 61 Top = 456 62 Width = 1 2862 Width = 152 63 63 Anchors = [akLeft, akBottom] 64 Caption = 'T ListString'64 Caption = 'TStringList<string>' 65 65 OnClick = ButtonBenchmarkListStringClick 66 66 TabOrder = 5 67 67 end 68 object ButtonListObject: TButton68 object ListObjectButton: TButton 69 69 Left = 8 70 70 Height = 25 71 71 Top = 163 72 Width = 1 2873 Caption = 'T ListObject'74 OnClick = ButtonListObjectClick72 Width = 152 73 Caption = 'TObjectList<Object>' 74 OnClick = ListObjectButtonClick 75 75 TabOrder = 6 76 76 end … … 79 79 Height = 25 80 80 Top = 424 81 Width = 1 2881 Width = 152 82 82 Anchors = [akLeft, akBottom] 83 Caption = 'TDictionary StringString'83 Caption = 'TDictionary<string,string>' 84 84 OnClick = ButtonBenchmarkDictionaryClick 85 85 TabOrder = 7 86 86 end 87 object ButtonMatrixInteger: TButton87 object MatrixIntegerButton: TButton 88 88 Left = 8 89 89 Height = 25 90 90 Top = 192 91 Width = 1 2892 Caption = 'TMatrix Integer'93 OnClick = ButtonMatrixIntegerClick91 Width = 152 92 Caption = 'TMatrix<Integer>' 93 OnClick = MatrixIntegerButtonClick 94 94 TabOrder = 8 95 95 end 96 96 object ListViewOutput: TListView 97 Left = 1 4497 Left = 168 98 98 Height = 491 99 99 Top = 24 100 Width = 5 42100 Width = 518 101 101 Anchors = [akTop, akLeft, akRight, akBottom] 102 102 Columns = < … … 114 114 end 115 115 object LabelTestName: TLabel 116 Left = 1 44116 Left = 168 117 117 Height = 14 118 118 Top = 8 … … 134 134 Height = 24 135 135 Top = 488 136 Width = 1 28136 Width = 152 137 137 Anchors = [akLeft, akBottom] 138 Caption = 'TList Pointer'138 Caption = 'TList<Pointer>' 139 139 OnClick = ButtonBenchmarkListPointerClick 140 140 TabOrder = 10 141 141 end 142 object ButtonStreamByte: TButton142 object StreamByteButton: TButton 143 143 Left = 8 144 144 Height = 25 145 145 Top = 224 146 Width = 1 28147 Caption = 'TStream Byte'148 OnClick = ButtonStreamByteClick146 Width = 152 147 Caption = 'TStream<Byte>' 148 OnClick = StreamByteButtonClick 149 149 TabOrder = 11 150 150 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 151 160 end -
Generics/NativeGenerics/Demo/UMainForm.pas
r324 r326 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 9 ComCtrls, GenericList, GenericDictionary, GenericQueue, GenericStream, 10 DateUtils, SpecializedList;10 DateUtils, GenericString, GenericTree; 11 11 12 12 type … … 15 15 16 16 TMainForm = class(TForm) 17 ButtonStreamByte: TButton; 17 TreeButton: TButton; 18 StreamByteButton: TButton; 18 19 ButtonBenchmarkDictionary: TButton; 19 20 ButtonBenchmarkListPointer: TButton; 20 ButtonListObject: TButton;21 ListObjectButton: TButton; 21 22 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; 28 29 Label1: TLabel; 29 30 LabelTestName: TLabel; … … 32 33 procedure ButtonBenchmarkListPointerClick(Sender: TObject); 33 34 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); 42 43 procedure FormCreate(Sender: TObject); 43 44 procedure FormDestroy(Sender: TObject); 45 procedure TreeButtonClick(Sender: TObject); 44 46 private 45 47 public … … 63 65 end; 64 66 65 procedure TMainForm. ButtonIntegerListClick(Sender: TObject);67 procedure TMainForm.IntegerListButtonClick(Sender: TObject); 66 68 var 67 69 List: TGList<Integer>; … … 70 72 begin 71 73 ListViewOutput.Clear; 72 LabelTestName.Caption := 'T ListIntegertest';74 LabelTestName.Caption := 'TGList<Integer> test'; 73 75 List := TGList<Integer>.Create; 74 76 List2 := TGList<Integer>.Create; … … 105 107 end; 106 108 107 procedure TMainForm. ButtonMatrixIntegerClick(Sender: TObject);109 procedure TMainForm.MatrixIntegerButtonClick(Sender: TObject); 108 110 //var 109 111 // Matrix: TGMatrix<Integer, Integer, Integer>; 110 112 begin 111 113 (* ListViewOutput.Clear; 112 LabelTestName.Caption := 'T MatrixIntegertest';114 LabelTestName.Caption := 'TGMatrix<Integer> test'; 113 115 Matrix := TGMatrix<Integer, Integer, Integer>.Create; 114 116 with Matrix do try … … 133 135 end; 134 136 135 procedure TMainForm. ButtonListObjectClick(Sender: TObject);136 //var137 //List: TListObject<TObject>;138 //I: Integer;139 begin 140 (*ListViewOutput.Clear;141 LabelTestName.Caption := 'T ListObjecttest';142 List := TG ListObject<TObject>.Create;137 procedure TMainForm.ListObjectButtonClick(Sender: TObject); 138 var 139 List: TGObjectList<TObject>; 140 I: Integer; 141 begin 142 ListViewOutput.Clear; 143 LabelTestName.Caption := 'TObjectList<TObject> test'; 144 List := TGObjectList<TObject>.Create; 143 145 with List do try 144 146 AddArray([TObject.Create, TObject.Create, TObject.Create, TObject.Create]); … … 155 157 finally 156 158 Free; 157 end; *)158 end; 159 160 procedure TMainForm. ButtonQueueIntegerClick(Sender: TObject);159 end; 160 end; 161 162 procedure TMainForm.QueueIntegerButtonClick(Sender: TObject); 161 163 var 162 164 Queue: TGQueue<Integer>; 163 165 begin 164 166 ListViewOutput.Clear; 165 LabelTestName.Caption := 'T QueueIntegertest';167 LabelTestName.Caption := 'TGQueue<Integer> test'; 166 168 Queue := TGQueue<Integer>.Create; 167 169 with Queue do try … … 179 181 end; 180 182 181 procedure TMainForm. ButtonStreamByteClick(Sender: TObject);183 procedure TMainForm.StreamByteButtonClick(Sender: TObject); 182 184 var 183 185 Stream: TGStream<Byte>; … … 187 189 begin 188 190 ListViewOutput.Clear; 189 LabelTestName.Caption := 'T StreamBytetest';191 LabelTestName.Caption := 'TGStream<Byte> test'; 190 192 Stream := TGStream<Byte>.Create; 191 193 with Stream do try … … 221 223 end; 222 224 223 procedure TMainForm. ButtonDictionaryStringClick(Sender: TObject);225 procedure TMainForm.DictionaryStringButtonClick(Sender: TObject); 224 226 //type 225 227 // TPairStringString = TGPair<string, string>; … … 228 230 begin 229 231 ListViewOutput.Clear; 230 LabelTestName.Caption := 'T DictionaryStringtest';232 LabelTestName.Caption := 'TGDictionary<string, string> test'; 231 233 Dictionary := TGDictionary<string, string>.Create; 232 234 with Dictionary do try … … 251 253 end; 252 254 253 procedure TMainForm. ButtonCharListClick(Sender: TObject);254 var 255 List: T ListChar;256 List2: T ListChar;257 begin 258 ListViewOutput.Clear; 259 LabelTestName.Caption := 'T ListChartest';260 List := T ListChar.Create;261 List2 := T ListChar.Create;255 procedure TMainForm.CharListButtonClick(Sender: TObject); 256 var 257 List: TGString<Char>; 258 List2: TGString<Char>; 259 begin 260 ListViewOutput.Clear; 261 LabelTestName.Caption := 'TGString<Char> test'; 262 List := TGString<Char>.Create; 263 List2 := TGString<Char>.Create; 262 264 with List do try 263 265 AddArray([' ', ' ', 'A', 'b', 'c', 'd', ' ']); … … 293 295 SampleCount: Integer = 100000; 294 296 begin 295 LabelTestName.Caption := 'Generic specialized T ListStringvs. classic non-generic TStringList benchmark';297 LabelTestName.Caption := 'Generic specialized TGStringList<string> vs. classic non-generic TStringList benchmark'; 296 298 ListViewOutput.Clear; 297 299 try … … 441 443 R: string; 442 444 begin 443 LabelTestName.Caption := 'Generic specialized T DictionaryStringStringvs. classic non-generic TStringList benchmark';445 LabelTestName.Caption := 'Generic specialized TGDictionary<string,string> vs. classic non-generic TStringList benchmark'; 444 446 ListViewOutput.Clear; 445 447 try … … 537 539 SampleCount: Integer = 100000; 538 540 begin 539 LabelTestName.Caption := 'Generic specialized T ListObjectvs. classic non-generic TFPList benchmark';541 LabelTestName.Caption := 'Generic specialized TGObjectList<Object> vs. classic non-generic TFPList benchmark'; 540 542 ListViewOutput.Clear; 541 543 try … … 728 730 end; 729 731 730 procedure TMainForm. ButtonStringListClick(Sender: TObject);732 procedure TMainForm.StringListButtonClick(Sender: TObject); 731 733 var 732 734 List: TGList<String>; 733 735 begin 734 736 ListViewOutput.Clear; 735 WriteOutput('T ListStringtest');737 WriteOutput('TGList<string> test'); 736 738 List := TGList<String>.Create; 737 739 with List do try … … 759 761 end; 760 762 763 procedure TMainForm.TreeButtonClick(Sender: TObject); 764 var 765 Tree: TGTree<string>; 766 //Tree2: TGTree<string>; 767 I: Integer; 768 begin 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;} 803 end; 804 761 805 procedure TMainForm.UpdateButtonState(Enabled: Boolean); 762 806 begin 763 807 ButtonBenchmarkDictionary.Enabled := Enabled; 764 808 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; 772 816 end; 773 817 -
Generics/NativeGenerics/Units/GenericList.pas
r324 r326 93 93 end; 94 94 95 T ListObject<TItem> = class(TGList<TItem>)95 TGObjectList<TItem> = class(TGList<TItem>) 96 96 private 97 97 procedure Put(Index: Integer; const AValue: TItem); override; … … 105 105 end; 106 106 107 T ListString<TItem> = class(TGList<TItem>)107 TGStringList<TItem> = class(TGList<TItem>) 108 108 private 109 109 public … … 603 603 end; 604 604 605 { T ListObject }606 607 procedure T ListObject<TItem>.Assign(Source: TGList<TItem>);605 { TGObjectList } 606 607 procedure TGObjectList<TItem>.Assign(Source: TGList<TItem>); 608 608 begin 609 609 Clear; … … 612 612 end; 613 613 614 procedure T ListObject<TItem>.Put(Index: Integer; const AValue: TItem);614 procedure TGObjectList<TItem>.Put(Index: Integer; const AValue: TItem); 615 615 begin 616 616 if OwnsObjects then FItems[Index].Free; … … 618 618 end; 619 619 620 procedure T ListObject<TItem>.Delete(Index: Integer);620 procedure TGObjectList<TItem>.Delete(Index: Integer); 621 621 begin 622 622 if OwnsObjects then FItems[Index].Free; … … 624 624 end; 625 625 626 procedure T ListObject<TItem>.Clear;626 procedure TGObjectList<TItem>.Clear; 627 627 var 628 628 I: Integer; … … 638 638 end; 639 639 640 constructor T ListObject<TItem>.Create;640 constructor TGObjectList<TItem>.Create; 641 641 begin 642 642 inherited; … … 644 644 end; 645 645 646 destructor T ListObject<TItem>.Destroy;646 destructor TGObjectList<TItem>.Destroy; 647 647 begin 648 648 Clear; … … 650 650 end; 651 651 652 { T ListString}653 654 procedure T ListString<TItem>.Assign(Source: TGList<TItem>);652 { TGStringList } 653 654 procedure TGStringList<TItem>.Assign(Source: TGList<TItem>); 655 655 begin 656 656 Clear; … … 658 658 end; 659 659 660 procedure T ListString<TItem>.Delete(Index: Integer);660 procedure TGStringList<TItem>.Delete(Index: Integer); 661 661 begin 662 662 FItems[Index] := ''; … … 664 664 end; 665 665 666 procedure T ListString<TItem>.Clear;666 procedure TGStringList<TItem>.Clear; 667 667 var 668 668 I: Integer; … … 676 676 end; 677 677 678 constructor T ListString<TItem>.Create;678 constructor TGStringList<TItem>.Create; 679 679 begin 680 680 inherited; 681 681 end; 682 682 683 destructor T ListString<TItem>.Destroy;683 destructor TGStringList<TItem>.Destroy; 684 684 begin 685 685 Clear; -
Generics/NativeGenerics/Units/GenericTree.pas
r132 r326 9 9 10 10 type 11 // TGTreeNode<TItem> = class;12 11 13 // TGTreeNodeList = TGList<TGTreeNode>; 12 { TGAbstractTreeNode } 14 13 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; 19 59 end; 20 60 21 61 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; 24 71 end; 72 25 73 26 74 implementation 27 75 28 76 { TGTreeNode } 77 78 function TGTreeNode<TItem>.GetValue: TItem; 79 begin 80 Result := FValue; 81 end; 82 83 procedure TGTreeNode<TItem>.SetValue(AValue: TItem); 84 begin 85 FValue := AValue; 86 end; 29 87 30 88 procedure TGTreeNode<TItem>.Clear; … … 40 98 end; 41 99 100 constructor TGTree<TItem>.Create; 101 begin 102 inherited; 103 FItems := TGList<TNode>.Create; 104 end; 105 106 destructor TGTree<TItem>.Destroy; 107 begin 108 inherited Destroy; 109 FItems.Free; 110 end; 111 112 { TGAbstractTree<TItem> } 113 114 function TGAbstractTree<TItem>.GetItem(Index: TIndex): TItem; 115 begin 116 117 end; 118 119 procedure TGAbstractTree<TItem>.SetItem(Index: TIndex; AValue: TItem); 120 begin 121 122 end; 123 124 constructor TGAbstractTree<TItem>.Create; 125 begin 126 end; 127 128 constructor TGTreeNode<TItem>.Create; 129 begin 130 inherited; 131 Childs := TGList<TNode>.Create; 132 end; 133 134 destructor TGTreeNode<TItem>.Destroy; 135 begin 136 Childs.Free; 137 inherited; 138 end; 139 140 { TGAbstractTreeNode<TItem> } 141 142 constructor TGAbstractTreeNode<TItem>.Create; 143 begin 144 end; 145 146 destructor TGAbstractTreeNode<TItem>.Destroy; 147 begin 148 inherited Destroy; 149 end; 150 151 42 152 end.
Note:
See TracChangeset
for help on using the changeset viewer.