- Timestamp:
- Oct 29, 2010, 7:49:29 AM (14 years ago)
- Location:
- Generics/TemplateGenerics
- Files:
-
- 6 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Demo
- Property svn:ignore
-
old new 1 1 lib 2 Demo.exe
-
- Property svn:ignore
-
Generics/TemplateGenerics/Demo/Demo.lpi
r74 r76 38 38 </Item2> 39 39 </RequiredPackages> 40 <Units Count=" 47">40 <Units Count="53"> 41 41 <Unit0> 42 42 <Filename Value="Demo.lpr"/> 43 43 <IsPartOfProject Value="True"/> 44 44 <UnitName Value="Demo"/> 45 <UsageCount Value="37"/> 45 <EditorIndex Value="4"/> 46 <WindowIndex Value="0"/> 47 <TopLine Value="1"/> 48 <CursorPos X="34" Y="7"/> 49 <UsageCount Value="39"/> 50 <Loaded Value="True"/> 46 51 <DefaultSyntaxHighlighter Value="Delphi"/> 47 52 </Unit0> … … 54 59 <EditorIndex Value="0"/> 55 60 <WindowIndex Value="0"/> 56 <TopLine Value=" 132"/>57 <CursorPos X=" 11" Y="150"/>58 <UsageCount Value="3 7"/>61 <TopLine Value="257"/> 62 <CursorPos X="38" Y="10"/> 63 <UsageCount Value="39"/> 59 64 <Loaded Value="True"/> 60 65 <LoadedDesigner Value="True"/> … … 201 206 <Filename Value="../Specialized/ListDouble.pas"/> 202 207 <UnitName Value="ListDouble"/> 203 <EditorIndex Value=" 1"/>208 <EditorIndex Value="8"/> 204 209 <WindowIndex Value="0"/> 205 210 <TopLine Value="1"/> 206 211 <CursorPos X="12" Y="21"/> 207 <UsageCount Value="1 7"/>212 <UsageCount Value="18"/> 208 213 <Loaded Value="True"/> 209 214 </Unit19> … … 211 216 <Filename Value="../Specialized/ListInteger.pas"/> 212 217 <UnitName Value="ListInteger"/> 213 <EditorIndex Value=" 2"/>218 <EditorIndex Value="9"/> 214 219 <WindowIndex Value="0"/> 215 220 <TopLine Value="1"/> 216 221 <CursorPos X="23" Y="21"/> 217 <UsageCount Value="1 7"/>222 <UsageCount Value="18"/> 218 223 <Loaded Value="True"/> 219 224 </Unit20> … … 221 226 <Filename Value="../Specialized/ListObject.pas"/> 222 227 <UnitName Value="ListObject"/> 223 <EditorIndex Value=" 3"/>228 <EditorIndex Value="10"/> 224 229 <WindowIndex Value="0"/> 225 230 <TopLine Value="2"/> 226 231 <CursorPos X="1" Y="33"/> 227 <UsageCount Value="1 7"/>232 <UsageCount Value="18"/> 228 233 <Loaded Value="True"/> 229 234 </Unit21> … … 231 236 <Filename Value="../Specialized/ListPointer.pas"/> 232 237 <UnitName Value="ListPointer"/> 233 <EditorIndex Value=" 4"/>238 <EditorIndex Value="11"/> 234 239 <WindowIndex Value="0"/> 235 240 <TopLine Value="1"/> 236 241 <CursorPos X="23" Y="21"/> 237 <UsageCount Value="1 7"/>242 <UsageCount Value="18"/> 238 243 <Loaded Value="True"/> 239 244 </Unit22> … … 241 246 <Filename Value="../Specialized/TreeString.pas"/> 242 247 <UnitName Value="TreeString"/> 243 <EditorIndex Value=" 5"/>248 <EditorIndex Value="12"/> 244 249 <WindowIndex Value="0"/> 245 250 <TopLine Value="1"/> 246 251 <CursorPos X="23" Y="24"/> 247 <UsageCount Value="1 7"/>252 <UsageCount Value="18"/> 248 253 <Loaded Value="True"/> 249 254 </Unit23> … … 251 256 <Filename Value="../Specialized/TreePointer.pas"/> 252 257 <UnitName Value="TreePointer"/> 253 <EditorIndex Value=" 6"/>258 <EditorIndex Value="13"/> 254 259 <WindowIndex Value="0"/> 255 260 <TopLine Value="1"/> 256 261 <CursorPos X="23" Y="13"/> 257 <UsageCount Value="1 7"/>262 <UsageCount Value="18"/> 258 263 <Loaded Value="True"/> 259 264 </Unit24> … … 261 266 <Filename Value="../Specialized/TreeObject.pas"/> 262 267 <UnitName Value="TreeObject"/> 263 <EditorIndex Value=" 7"/>268 <EditorIndex Value="14"/> 264 269 <WindowIndex Value="0"/> 265 270 <TopLine Value="1"/> 266 271 <CursorPos X="23" Y="24"/> 267 <UsageCount Value="1 7"/>272 <UsageCount Value="18"/> 268 273 <Loaded Value="True"/> 269 274 </Unit25> … … 271 276 <Filename Value="../Specialized/TreeInteger.pas"/> 272 277 <UnitName Value="TreeInteger"/> 273 <EditorIndex Value=" 8"/>278 <EditorIndex Value="15"/> 274 279 <WindowIndex Value="0"/> 275 280 <TopLine Value="1"/> 276 281 <CursorPos X="1" Y="27"/> 277 <UsageCount Value="1 7"/>282 <UsageCount Value="18"/> 278 283 <Loaded Value="True"/> 279 284 </Unit26> … … 281 286 <Filename Value="../Specialized/ListString.pas"/> 282 287 <UnitName Value="ListString"/> 283 <EditorIndex Value=" 17"/>288 <EditorIndex Value="24"/> 284 289 <WindowIndex Value="0"/> 285 290 <TopLine Value="1"/> 286 291 <CursorPos X="29" Y="17"/> 287 <UsageCount Value="1 7"/>292 <UsageCount Value="18"/> 288 293 <Loaded Value="True"/> 289 294 </Unit27> 290 295 <Unit28> 291 296 <Filename Value="../Generic/TreeImplementation.tpl"/> 292 <EditorIndex Value=" 9"/>297 <EditorIndex Value="16"/> 293 298 <WindowIndex Value="0"/> 294 299 <TopLine Value="1"/> 295 300 <CursorPos X="1" Y="2"/> 296 <UsageCount Value="1 7"/>301 <UsageCount Value="18"/> 297 302 <Loaded Value="True"/> 298 303 <DefaultSyntaxHighlighter Value="None"/> … … 300 305 <Unit29> 301 306 <Filename Value="../Generic/TreeInterface.tpl"/> 302 <EditorIndex Value=" 16"/>307 <EditorIndex Value="23"/> 303 308 <WindowIndex Value="0"/> 304 309 <TopLine Value="1"/> 305 310 <CursorPos X="40" Y="11"/> 306 <UsageCount Value="1 7"/>311 <UsageCount Value="18"/> 307 312 <Loaded Value="True"/> 308 313 <DefaultSyntaxHighlighter Value="None"/> … … 310 315 <Unit30> 311 316 <Filename Value="../Generic/ListInterface.tpl"/> 312 <EditorIndex Value=" 19"/>313 <WindowIndex Value="0"/> 314 <TopLine Value=" 16"/>315 <CursorPos X="1 " Y="28"/>316 <UsageCount Value="1 7"/>317 <EditorIndex Value="25"/> 318 <WindowIndex Value="0"/> 319 <TopLine Value="22"/> 320 <CursorPos X="14" Y="35"/> 321 <UsageCount Value="18"/> 317 322 <Loaded Value="True"/> 318 323 <DefaultSyntaxHighlighter Value="None"/> … … 320 325 <Unit31> 321 326 <Filename Value="../Generic/ListImplementation.tpl"/> 322 <EditorIndex Value="2 3"/>323 <WindowIndex Value="0"/> 324 <TopLine Value=" 288"/>325 <CursorPos X=" 17" Y="305"/>326 <UsageCount Value="1 7"/>327 <EditorIndex Value="27"/> 328 <WindowIndex Value="0"/> 329 <TopLine Value="111"/> 330 <CursorPos X="3" Y="113"/> 331 <UsageCount Value="18"/> 327 332 <Loaded Value="True"/> 328 333 <DefaultSyntaxHighlighter Value="None"/> … … 330 335 <Unit32> 331 336 <Filename Value="../Generic/DictionaryImplementation.tpl"/> 332 <EditorIndex Value="1 0"/>337 <EditorIndex Value="17"/> 333 338 <WindowIndex Value="0"/> 334 339 <TopLine Value="23"/> 335 340 <CursorPos X="1" Y="2"/> 336 <UsageCount Value="1 7"/>341 <UsageCount Value="18"/> 337 342 <Loaded Value="True"/> 338 343 <DefaultSyntaxHighlighter Value="None"/> … … 340 345 <Unit33> 341 346 <Filename Value="../Generic/DictionaryInterface.tpl"/> 342 <EditorIndex Value=" 14"/>347 <EditorIndex Value="21"/> 343 348 <WindowIndex Value="0"/> 344 349 <TopLine Value="1"/> 345 350 <CursorPos X="1" Y="9"/> 346 <UsageCount Value="1 7"/>351 <UsageCount Value="18"/> 347 352 <Loaded Value="True"/> 348 353 <DefaultSyntaxHighlighter Value="None"/> … … 351 356 <Filename Value="../Specialized/DictionaryString.pas"/> 352 357 <UnitName Value="DictionaryString"/> 353 <EditorIndex Value=" 15"/>358 <EditorIndex Value="22"/> 354 359 <WindowIndex Value="0"/> 355 360 <TopLine Value="1"/> 356 361 <CursorPos X="32" Y="18"/> 357 <UsageCount Value="1 7"/>362 <UsageCount Value="18"/> 358 363 <Loaded Value="True"/> 359 364 </Unit34> 360 365 <Unit35> 361 366 <Filename Value="../Generic/StackInterface.tpl"/> 362 <EditorIndex Value="1 1"/>363 <WindowIndex Value="0"/> 364 <TopLine Value="1"/> 365 <CursorPos X=" 30" Y="11"/>366 <UsageCount Value="1 5"/>367 <EditorIndex Value="18"/> 368 <WindowIndex Value="0"/> 369 <TopLine Value="1"/> 370 <CursorPos X="42" Y="15"/> 371 <UsageCount Value="16"/> 367 372 <Loaded Value="True"/> 368 373 <DefaultSyntaxHighlighter Value="None"/> … … 371 376 <Filename Value="../Specialized/StackString.pas"/> 372 377 <UnitName Value="StackString"/> 373 <EditorIndex Value="1 2"/>378 <EditorIndex Value="19"/> 374 379 <WindowIndex Value="0"/> 375 380 <TopLine Value="1"/> 376 381 <CursorPos X="1" Y="22"/> 377 <UsageCount Value="1 5"/>382 <UsageCount Value="16"/> 378 383 <Loaded Value="True"/> 379 384 </Unit36> 380 385 <Unit37> 381 386 <Filename Value="../Generic/StackImplementation.tpl"/> 382 <EditorIndex Value=" 13"/>383 <WindowIndex Value="0"/> 384 <TopLine Value="1"/> 385 <CursorPos X=" 16" Y="12"/>386 <UsageCount Value="1 5"/>387 <EditorIndex Value="20"/> 388 <WindowIndex Value="0"/> 389 <TopLine Value="1"/> 390 <CursorPos X="32" Y="12"/> 391 <UsageCount Value="16"/> 387 392 <Loaded Value="True"/> 388 393 <DefaultSyntaxHighlighter Value="None"/> … … 390 395 <Unit38> 391 396 <Filename Value="../Generic/QueueImplementation.tpl"/> 392 <EditorIndex Value="2 7"/>393 <WindowIndex Value="0"/> 394 <TopLine Value="1"/> 395 <CursorPos X=" 1" Y="17"/>396 <UsageCount Value="1 5"/>397 <EditorIndex Value="28"/> 398 <WindowIndex Value="0"/> 399 <TopLine Value="1"/> 400 <CursorPos X="33" Y="28"/> 401 <UsageCount Value="16"/> 397 402 <Loaded Value="True"/> 398 403 <DefaultSyntaxHighlighter Value="None"/> … … 400 405 <Unit39> 401 406 <Filename Value="../Generic/QueueInterface.tpl"/> 402 <EditorIndex Value="2 8"/>403 <WindowIndex Value="0"/> 404 <TopLine Value="1"/> 405 <CursorPos X="1 4" Y="11"/>406 <UsageCount Value="1 5"/>407 <EditorIndex Value="29"/> 408 <WindowIndex Value="0"/> 409 <TopLine Value="1"/> 410 <CursorPos X="18" Y="14"/> 411 <UsageCount Value="16"/> 407 412 <Loaded Value="True"/> 408 413 <DefaultSyntaxHighlighter Value="None"/> … … 410 415 <Unit40> 411 416 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/sysstrh.inc"/> 412 <EditorIndex Value="24"/>413 417 <WindowIndex Value="0"/> 414 418 <TopLine Value="60"/> 415 419 <CursorPos X="10" Y="77"/> 416 420 <UsageCount Value="14"/> 417 <Loaded Value="True"/>418 421 <DefaultSyntaxHighlighter Value="Delphi"/> 419 422 </Unit40> 420 423 <Unit41> 421 424 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/sysstr.inc"/> 422 <EditorIndex Value="25"/>423 425 <WindowIndex Value="0"/> 424 426 <TopLine Value="89"/> 425 427 <CursorPos X="62" Y="98"/> 426 428 <UsageCount Value="11"/> 427 <Loaded Value="True"/>428 429 <DefaultSyntaxHighlighter Value="Delphi"/> 429 430 </Unit41> … … 431 432 <Filename Value="../Specialized/ListChar.pas"/> 432 433 <UnitName Value="ListChar"/> 433 <IsVisibleTab Value="True"/> 434 <EditorIndex Value="20"/> 434 <EditorIndex Value="26"/> 435 435 <WindowIndex Value="0"/> 436 436 <TopLine Value="49"/> 437 <CursorPos X=" 10" Y="78"/>438 <UsageCount Value="1 4"/>437 <CursorPos X="24" Y="60"/> 438 <UsageCount Value="15"/> 439 439 <Loaded Value="True"/> 440 440 </Unit42> … … 442 442 <Filename Value="/usr/share/fpcsrc/rtl/unix/sysutils.pp"/> 443 443 <UnitName Value="sysutils"/> 444 <EditorIndex Value="18"/>445 444 <WindowIndex Value="0"/> 446 445 <TopLine Value="1"/> 447 446 <CursorPos X="15" Y="8"/> 448 447 <UsageCount Value="11"/> 449 <Loaded Value="True"/>450 448 <DefaultSyntaxHighlighter Value="Delphi"/> 451 449 </Unit43> 452 450 <Unit44> 453 451 <Filename Value="/usr/share/fpcsrc/rtl/inc/systemh.inc"/> 454 <EditorIndex Value="26"/>455 452 <WindowIndex Value="0"/> 456 453 <TopLine Value="747"/> 457 454 <CursorPos X="11" Y="764"/> 458 455 <UsageCount Value="11"/> 459 <Loaded Value="True"/>460 456 <DefaultSyntaxHighlighter Value="Delphi"/> 461 457 </Unit44> 462 458 <Unit45> 463 459 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/sysunih.inc"/> 464 <EditorIndex Value="21"/>465 460 <WindowIndex Value="0"/> 466 461 <TopLine Value="3"/> 467 462 <CursorPos X="10" Y="21"/> 468 463 <UsageCount Value="10"/> 469 <Loaded Value="True"/>470 464 <DefaultSyntaxHighlighter Value="Delphi"/> 471 465 </Unit45> 472 466 <Unit46> 473 467 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/sysuni.inc"/> 474 <EditorIndex Value="22"/>475 468 <WindowIndex Value="0"/> 476 469 <TopLine Value="21"/> 477 470 <CursorPos X="5" Y="25"/> 478 471 <UsageCount Value="10"/> 479 <Loaded Value="True"/>480 472 <DefaultSyntaxHighlighter Value="Delphi"/> 481 473 </Unit46> 474 <Unit47> 475 <Filename Value="StopWatch.pas"/> 476 <UnitName Value="StopWatch"/> 477 <EditorIndex Value="7"/> 478 <WindowIndex Value="0"/> 479 <TopLine Value="12"/> 480 <CursorPos X="67" Y="25"/> 481 <UsageCount Value="11"/> 482 <Loaded Value="True"/> 483 <DefaultSyntaxHighlighter Value="Delphi"/> 484 </Unit47> 485 <Unit48> 486 <Filename Value="../../../../../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/classes/classesh.inc"/> 487 <EditorIndex Value="5"/> 488 <WindowIndex Value="0"/> 489 <TopLine Value="203"/> 490 <CursorPos X="15" Y="216"/> 491 <UsageCount Value="11"/> 492 <Loaded Value="True"/> 493 </Unit48> 494 <Unit49> 495 <Filename Value="../../../../../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/classes/lists.inc"/> 496 <EditorIndex Value="6"/> 497 <WindowIndex Value="0"/> 498 <TopLine Value="694"/> 499 <CursorPos X="12" Y="696"/> 500 <UsageCount Value="11"/> 501 <Loaded Value="True"/> 502 </Unit49> 503 <Unit50> 504 <Filename Value="../Generic/SetInterface.tpl"/> 505 <EditorIndex Value="2"/> 506 <WindowIndex Value="0"/> 507 <TopLine Value="1"/> 508 <CursorPos X="4" Y="12"/> 509 <UsageCount Value="10"/> 510 <Loaded Value="True"/> 511 <DefaultSyntaxHighlighter Value="None"/> 512 </Unit50> 513 <Unit51> 514 <Filename Value="../Specialized/SetChar.pas"/> 515 <UnitName Value="SetChar"/> 516 <IsVisibleTab Value="True"/> 517 <EditorIndex Value="3"/> 518 <WindowIndex Value="0"/> 519 <TopLine Value="17"/> 520 <CursorPos X="14" Y="39"/> 521 <UsageCount Value="10"/> 522 <Loaded Value="True"/> 523 </Unit51> 524 <Unit52> 525 <Filename Value="../Generic/SetImplementation.tpl"/> 526 <EditorIndex Value="1"/> 527 <WindowIndex Value="0"/> 528 <TopLine Value="1"/> 529 <CursorPos X="1" Y="1"/> 530 <UsageCount Value="10"/> 531 <Loaded Value="True"/> 532 <DefaultSyntaxHighlighter Value="None"/> 533 </Unit52> 482 534 </Units> 483 <JumpHistory Count=" 30" HistoryIndex="29">535 <JumpHistory Count="28" HistoryIndex="27"> 484 536 <Position1> 485 <Filename Value=" ../Specialized/ListChar.pas"/>486 <Caret Line=" 20" Column="15" TopLine="3"/>537 <Filename Value="UMainForm.pas"/> 538 <Caret Line="34" Column="1" TopLine="21"/> 487 539 </Position1> 488 540 <Position2> 489 <Filename Value=" ../Specialized/ListChar.pas"/>490 <Caret Line=" 32" Column="22" TopLine="14"/>541 <Filename Value="UMainForm.pas"/> 542 <Caret Line="48" Column="1" TopLine="35"/> 491 543 </Position2> 492 544 <Position3> 493 <Filename Value=" ../Specialized/ListChar.pas"/>494 <Caret Line=" 34" Column="20" TopLine="14"/>545 <Filename Value="UMainForm.pas"/> 546 <Caret Line="185" Column="18" TopLine="161"/> 495 547 </Position3> 496 548 <Position4> 497 <Filename Value=" ../Specialized/ListChar.pas"/>498 <Caret Line=" 8" Column="19" TopLine="1"/>549 <Filename Value="UMainForm.pas"/> 550 <Caret Line="199" Column="17" TopLine="175"/> 499 551 </Position4> 500 552 <Position5> 501 <Filename Value="../ Specialized/ListChar.pas"/>502 <Caret Line=" 34" Column="24" TopLine="14"/>553 <Filename Value="../../../../../Programy/Lazarus/fpc/2.4.3/source/rtl/objpas/classes/classesh.inc"/> 554 <Caret Line="261" Column="16" TopLine="251"/> 503 555 </Position5> 504 556 <Position6> 505 <Filename Value=" /usr/share/fpcsrc/rtl/objpas/sysutils/sysstr.inc"/>506 <Caret Line=" 98" Column="11" TopLine="89"/>557 <Filename Value="../Generic/ListImplementation.tpl"/> 558 <Caret Line="178" Column="9" TopLine="167"/> 507 559 </Position6> 508 560 <Position7> 509 <Filename Value=" ../Specialized/ListChar.pas"/>510 <Caret Line=" 34" Column="17" TopLine="11"/>561 <Filename Value="UMainForm.pas"/> 562 <Caret Line="216" Column="12" TopLine="196"/> 511 563 </Position7> 512 564 <Position8> 513 <Filename Value=" ../Specialized/ListChar.pas"/>514 <Caret Line=" 32" Column="30" TopLine="15"/>565 <Filename Value="UMainForm.pas"/> 566 <Caret Line="191" Column="15" TopLine="187"/> 515 567 </Position8> 516 568 <Position9> 517 <Filename Value=" ../Specialized/ListChar.pas"/>518 <Caret Line=" 52" Column="16" TopLine="22"/>569 <Filename Value="UMainForm.pas"/> 570 <Caret Line="223" Column="15" TopLine="208"/> 519 571 </Position9> 520 572 <Position10> 521 <Filename Value=" ../Specialized/ListChar.pas"/>522 <Caret Line=" 23" Column="13" TopLine="8"/>573 <Filename Value="UMainForm.pas"/> 574 <Caret Line="191" Column="15" TopLine="184"/> 523 575 </Position10> 524 576 <Position11> 525 <Filename Value="../Generic/ListI nterface.tpl"/>526 <Caret Line=" 28" Column="52" TopLine="11"/>577 <Filename Value="../Generic/ListImplementation.tpl"/> 578 <Caret Line="166" Column="11" TopLine="156"/> 527 579 </Position11> 528 580 <Position12> 529 <Filename Value=" UMainForm.pas"/>530 <Caret Line=" 90" Column="1" TopLine="76"/>581 <Filename Value="../Generic/ListImplementation.tpl"/> 582 <Caret Line="171" Column="12" TopLine="156"/> 531 583 </Position12> 532 584 <Position13> 533 <Filename Value=" UMainForm.pas"/>534 <Caret Line=" 92" Column="1" TopLine="78"/>585 <Filename Value="../Generic/ListImplementation.tpl"/> 586 <Caret Line="160" Column="1" TopLine="155"/> 535 587 </Position13> 536 588 <Position14> 537 <Filename Value=" UMainForm.pas"/>538 <Caret Line="1 38" Column="1" TopLine="117"/>589 <Filename Value="../Generic/ListImplementation.tpl"/> 590 <Caret Line="162" Column="1" TopLine="155"/> 539 591 </Position14> 540 592 <Position15> 541 <Filename Value=" UMainForm.pas"/>542 <Caret Line=" 9" Column="78" TopLine="1"/>593 <Filename Value="../Generic/ListImplementation.tpl"/> 594 <Caret Line="164" Column="1" TopLine="155"/> 543 595 </Position15> 544 596 <Position16> 545 <Filename Value=" UMainForm.pas"/>546 <Caret Line="1 32" Column="1" TopLine="120"/>597 <Filename Value="../Generic/ListImplementation.tpl"/> 598 <Caret Line="165" Column="1" TopLine="155"/> 547 599 </Position16> 548 600 <Position17> 549 <Filename Value=" UMainForm.pas"/>550 <Caret Line="1 45" Column="44" TopLine="125"/>601 <Filename Value="../Generic/ListImplementation.tpl"/> 602 <Caret Line="166" Column="1" TopLine="155"/> 551 603 </Position17> 552 604 <Position18> 553 <Filename Value=" UMainForm.pas"/>554 <Caret Line="1 48" Column="23" TopLine="132"/>605 <Filename Value="../Generic/ListImplementation.tpl"/> 606 <Caret Line="167" Column="1" TopLine="155"/> 555 607 </Position18> 556 608 <Position19> 557 609 <Filename Value="UMainForm.pas"/> 558 <Caret Line="1 47" Column="11" TopLine="132"/>610 <Caret Line="193" Column="11" TopLine="163"/> 559 611 </Position19> 560 612 <Position20> 561 <Filename Value="../ Specialized/ListChar.pas"/>562 <Caret Line=" 64" Column="1" TopLine="47"/>613 <Filename Value="../Generic/ListImplementation.tpl"/> 614 <Caret Line="166" Column="12" TopLine="155"/> 563 615 </Position20> 564 616 <Position21> 565 <Filename Value=" ../Specialized/ListChar.pas"/>566 <Caret Line=" 65" Column="1" TopLine="47"/>617 <Filename Value="Demo.lpr"/> 618 <Caret Line="1" Column="1" TopLine="1"/> 567 619 </Position21> 568 620 <Position22> 569 <Filename Value=" ../Specialized/ListChar.pas"/>570 <Caret Line=" 59" Column="81" TopLine="47"/>621 <Filename Value="Demo.lpr"/> 622 <Caret Line="18" Column="9" TopLine="1"/> 571 623 </Position22> 572 624 <Position23> 573 <Filename Value=" UMainForm.pas"/>574 <Caret Line="14 6" Column="13" TopLine="132"/>625 <Filename Value="../Generic/StackInterface.tpl"/> 626 <Caret Line="14" Column="35" TopLine="1"/> 575 627 </Position23> 576 628 <Position24> 577 <Filename Value="../ Specialized/ListChar.pas"/>578 <Caret Line=" 64" Column="1" TopLine="47"/>629 <Filename Value="../Generic/StackImplementation.tpl"/> 630 <Caret Line="12" Column="19" TopLine="1"/> 579 631 </Position24> 580 632 <Position25> 581 <Filename Value="../ Specialized/ListChar.pas"/>582 <Caret Line=" 65" Column="1" TopLine="47"/>633 <Filename Value="../Generic/QueueImplementation.tpl"/> 634 <Caret Line="27" Column="1" TopLine="1"/> 583 635 </Position25> 584 636 <Position26> 585 <Filename Value=" ../Specialized/ListChar.pas"/>586 <Caret Line=" 67" Column="1" TopLine="47"/>637 <Filename Value="UMainForm.pas"/> 638 <Caret Line="250" Column="3" TopLine="225"/> 587 639 </Position26> 588 640 <Position27> 589 <Filename Value="../Specialized/ ListChar.pas"/>590 <Caret Line=" 68" Column="21" TopLine="47"/>641 <Filename Value="../Specialized/SetChar.pas"/> 642 <Caret Line="1" Column="1" TopLine="1"/> 591 643 </Position27> 592 644 <Position28> 593 <Filename Value=" UMainForm.pas"/>594 <Caret Line=" 150" Column="11" TopLine="132"/>645 <Filename Value="../Specialized/SetChar.pas"/> 646 <Caret Line="2" Column="1" TopLine="4"/> 595 647 </Position28> 596 <Position29>597 <Filename Value="../Specialized/ListChar.pas"/>598 <Caret Line="68" Column="9" TopLine="49"/>599 </Position29>600 <Position30>601 <Filename Value="../Specialized/ListChar.pas"/>602 <Caret Line="78" Column="10" TopLine="49"/>603 </Position30>604 648 </JumpHistory> 605 649 </ProjectOptions> -
Generics/TemplateGenerics/Demo/UMainForm.lfm
r74 r76 4 4 Top = 129 5 5 Width = 478 6 ActiveControl = ButtonIntegerList7 6 Caption = 'Template generics demo' 8 7 ClientHeight = 397 … … 66 65 TabOrder = 5 67 66 end 67 object ButtonBenchmark: TButton 68 Left = 10 69 Height = 25 70 Top = 350 71 Width = 112 72 Caption = 'Benchmark' 73 OnClick = ButtonBenchmarkClick 74 TabOrder = 6 75 end 68 76 end -
Generics/TemplateGenerics/Demo/UMainForm.pas
r74 r76 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, ListInteger, ListString, DictionaryString, QueueInteger, ListChar; 9 ComCtrls, ListInteger, ListString, DictionaryString, QueueInteger, ListChar, 10 ListPointer, DateUtils, ListVariant; 10 11 11 12 type … … 14 15 15 16 TMainForm = class(TForm) 17 ButtonBenchmark: TButton; 16 18 ButtonCharList: TButton; 17 19 ButtonQueueInteger: TButton; … … 20 22 ButtonStringList: TButton; 21 23 MemoOutput: TMemo; 24 procedure ButtonBenchmarkClick(Sender: TObject); 22 25 procedure ButtonCharListClick(Sender: TObject); 23 26 procedure ButtonDictionaryStringClick(Sender: TObject); … … 28 31 procedure FormDestroy(Sender: TObject); 29 32 private 30 { private declarations }31 33 public 32 34 procedure WriteLn(Text: string); … … 86 88 Enqueue(2); 87 89 Enqueue(3); 88 WriteLn('Implode: ' + Implode(',', IntToStr));90 WriteLn('Implode: ' + List.Implode(',', IntToStr)); 89 91 WriteLn('Enqueue: 4'); 90 92 Enqueue(4); 91 WriteLn('Implode: ' + Implode(',', IntToStr));93 WriteLn('Implode: ' + List.Implode(',', IntToStr)); 92 94 WriteLn('Dequeue: ' + IntToStr(Dequeue)); 93 WriteLn('Implode: ' + Implode(',', IntToStr));95 WriteLn('Implode: ' + List.Implode(',', IntToStr)); 94 96 finally 95 97 Free; … … 158 160 end; 159 161 162 procedure TMainForm.ButtonBenchmarkClick(Sender: TObject); 163 var 164 List: TListPointer; 165 List2: TList; 166 StartTime: TDateTime; 167 I: Integer; 168 begin 169 MemoOutput.Clear; 170 try 171 List := TListPointer.Create; 172 WriteLn('TListPointer...'); 173 StartTime := Now; 174 repeat 175 List.Add(1); 176 until (Now - StartTime) > OneSecond; 177 WriteLn('Add: ' + IntToStr(List.Count) + ' ops/sec'); 178 List.Clear; 179 180 StartTime := Now; 181 repeat 182 List.Insert(0, 1); 183 until (Now - StartTime) > OneSecond; 184 WriteLn('Insert: ' + IntToStr(List.Count) + ' ops/sec'); 185 List.Clear; 186 187 for I := 0 to 1000000 do 188 List.Add(1); 189 StartTime := Now; 190 I := 0; 191 repeat 192 List.Delete(0); 193 Inc(I); 194 until (Now - StartTime) > OneSecond; 195 WriteLn('Delete: ' + IntToStr(I) + ' ops/sec'); 196 List.Clear; 197 198 for I := 0 to 1000000 do 199 List.Add(1); 200 StartTime := Now; 201 I := 0; 202 repeat 203 List.Move(300000, 700000); 204 Inc(I); 205 until (Now - StartTime) > OneSecond; 206 WriteLn('Move: ' + IntToStr(I) + ' ops/sec'); 207 List.Clear; 208 209 finally 210 List.Free; 211 end; 212 213 try 214 List2 := TList.Create; 215 WriteLn('Test TList...'); 216 StartTime := Now; 217 repeat 218 List2.Add(1); 219 until (Now - StartTime) > OneSecond; 220 WriteLn('Add: ' + IntToStr(List2.Count) + ' ops/sec'); 221 List2.Clear; 222 223 StartTime := Now; 224 repeat 225 List2.Insert(0, 1); 226 until (Now - StartTime) > OneSecond; 227 WriteLn('Insert: ' + IntToStr(List2.Count) + ' ops/sec'); 228 List2.Clear; 229 230 for I := 0 to 1000000 do 231 List2.Add(1); 232 StartTime := Now; 233 I := 0; 234 repeat 235 List2.Delete(0); 236 Inc(I); 237 until (Now - StartTime) > OneSecond; 238 WriteLn('Delete: ' + IntToStr(I) + ' ops/sec'); 239 240 for I := 0 to 1000000 do 241 List2.Add(1); 242 StartTime := Now; 243 I := 0; 244 repeat 245 List2.Move(300000, 700000); 246 Inc(I); 247 until (Now - StartTime) > OneSecond; 248 WriteLn('Move: ' + IntToStr(I) + ' ops/sec'); 249 250 finally 251 List2.Free; 252 end; 253 end; 254 160 255 function StrToStr(Value: string): string; 161 256 begin -
Generics/TemplateGenerics/Generic/ListImplementation.tpl
r74 r76 1 1 uses 2 2 RtlConsts; 3 4 // Used instead of System.Move form because of error: Identifier "System" not found5 procedure SystemMove(const Source; var Dest; Count: SizeInt);6 begin7 Move(Source, Dest, Count);8 end;9 3 10 4 { TGList } … … 130 124 if FCount = Capacity then Expand; 131 125 if Index < FCount then 132 System Move(FItems[Index], FItems[Index + 1], (FCount - Index) * SizeOf(TListItem));126 System.Move(FItems[Index], FItems[Index + 1], (FCount - Index) * SizeOf(TListItem)); 133 127 FItems[Index] := Item; 134 128 FCount := FCount + 1; … … 163 157 raise EListError.CreateFmt(SlistIndexError, [NewIndex]); 164 158 Temp := FItems[CurIndex]; 165 Delete(CurIndex); 166 Insert(NewIndex, Temp); 159 if NewIndex > CurIndex then begin 160 System.Move(FItems[CurIndex + 1], FItems[CurIndex], (NewIndex - CurIndex) * SizeOf(TListItem)); 161 end else 162 if NewIndex < CurIndex then begin 163 System.Move(FItems[NewIndex], FItems[NewIndex + 1], (CurIndex - NewIndex) * SizeOf(TListItem)); 164 end; 165 FItems[NewIndex] := Temp; 166 //Delete(CurIndex); 167 //Insert(NewIndex, Temp); 167 168 end; 168 169 … … 289 290 raise EListError.CreateFmt(SListIndexError, [Index]); 290 291 FCount := FCount - 1; 291 System Move(FItems[Index + 1], FItems[Index], (FCount - Index) * SizeOf(TListItem));292 System.Move(FItems[Index + 1], FItems[Index], (FCount - Index) * SizeOf(TListItem)); 292 293 // Shrink the list if appropriate 293 294 if (Capacity > 256) and (FCount < Capacity shr 2) then -
Generics/TemplateGenerics/Generic/QueueImplementation.tpl
r73 r76 5 5 procedure TGQueue.Enqueue(Value: TQueueItem); 6 6 begin 7 Add(Value);7 FList.Add(Value); 8 8 end; 9 9 10 10 function TGQueue.Peek: TQueueItem; 11 11 begin 12 Result := First; 12 Result := FList.First; 13 end; 14 15 constructor TGQueue.Create; 16 begin 17 FList := TGList.Create; 18 end; 19 20 destructor TGQueue.Destroy; 21 begin 22 FList.Free; 23 inherited Destroy; 13 24 end; 14 25 15 26 function TGQueue.Dequeue: TQueueItem; 16 27 begin 17 Result := Extract(First);28 Result := FList.Extract(FList.First); 18 29 end; 19 30 -
Generics/TemplateGenerics/Generic/QueueInterface.tpl
r73 r76 4 4 {$INCLUDE 'ListInterface.tpl'} 5 5 6 // TGQueue<T ListIndex, TListItem> = class(TGList)7 TGQueue = class (TGList)6 // TGQueue<TSetIndex, TSetItem> = class(TGList) 7 TGQueue = class 8 8 private 9 FList: TGList; 9 10 public 10 11 procedure Enqueue(Value: TQueueItem); 11 12 function Dequeue: TQueueItem; 12 13 function Peek: TQueueItem; 14 constructor Create; 15 destructor Destroy; override; 16 property List: TGList read FList; 13 17 end; -
Generics/TemplateGenerics/Generic/StackImplementation.tpl
r73 r76 5 5 procedure TGStack.Push(Value: TStackItem); 6 6 begin 7 Add(Value);7 FList.Add(Value); 8 8 end; 9 9 10 10 function TGStack.Pop: TStackItem; 11 11 begin 12 Result := Extract(Last);12 Result := FList.Extract(FList.Last); 13 13 end; 14 14 15 constructor TGStack.Create; 16 begin 17 FList := TGList.Create; 18 end; 19 20 destructor TGStack.Destroy; 21 begin 22 FList.Free; 23 inherited Destroy; 24 end; 25 -
Generics/TemplateGenerics/Generic/StackInterface.tpl
r73 r76 4 4 {$INCLUDE 'ListInterface.tpl'} 5 5 6 // TGStack<T ListIndex, TListItem> = class(TGList)7 TGStack = class (TGList)6 // TGStack<TStackIndex, TStackItem> = class(TGList) 7 TGStack = class 8 8 private 9 FList: TGList; 9 10 public 10 11 procedure Push(Value: TStackItem); 11 12 function Pop: TStackItem; 13 constructor Create; 14 destructor Destroy; override; 15 property List: TGList read FList; 12 16 end; -
Generics/TemplateGenerics/TemplateGenerics.lpk
r74 r76 4 4 <PathDelim Value="\"/> 5 5 <Name Value="TemplateGenerics"/> 6 <Author Value="Chronos"/> 6 7 <CompilerOptions> 7 8 <Version Value="9"/> … … 15 16 </Other> 16 17 </CompilerOptions> 17 <Files Count="31"> 18 <Version Minor="1"/> 19 <Files Count="38"> 18 20 <Item1> 19 21 <Filename Value="Generic\DictionaryImplementation.tpl"/> … … 140 142 <UnitName Value="ListChar"/> 141 143 </Item31> 144 <Item32> 145 <Filename Value="ReadMe.txt"/> 146 <Type Value="Text"/> 147 </Item32> 148 <Item33> 149 <Filename Value="Generic\SetImplementation.tpl"/> 150 <Type Value="Text"/> 151 </Item33> 152 <Item34> 153 <Filename Value="Generic\SetInterface.tpl"/> 154 <Type Value="Text"/> 155 </Item34> 156 <Item35> 157 <Filename Value="Specialized\ListVariant.pas"/> 158 <UnitName Value="ListVariant"/> 159 </Item35> 160 <Item36> 161 <Filename Value="Specialized\SetInteger.pas"/> 162 <UnitName Value="SetInteger"/> 163 </Item36> 164 <Item37> 165 <Filename Value="Specialized\SetString.pas"/> 166 <UnitName Value="SetString"/> 167 </Item37> 168 <Item38> 169 <Filename Value="Specialized\SetChar.pas"/> 170 <UnitName Value="SetChar"/> 171 </Item38> 142 172 </Files> 143 173 <Type Value="RunAndDesignTime"/> -
Generics/TemplateGenerics/TemplateGenerics.pas
r74 r76 11 11 TreeObject, TreePointer, TreeString, DictionaryString, StackDouble, 12 12 StackInteger, StackObject, StackPointer, StackString, QueueDouble, 13 QueueInteger, QueueObject, QueuePointer, QueueString, ListChar, 14 LazarusPackageIntf;13 QueueInteger, QueueObject, QueuePointer, QueueString, ListChar, ListVariant, 14 SetInteger, SetString, SetChar, LazarusPackageIntf; 15 15 16 16 implementation
Note:
See TracChangeset
for help on using the changeset viewer.