- Timestamp:
- Nov 17, 2010, 7:34:05 PM (14 years ago)
- Location:
- Generics/TemplateGenerics
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Demo/Demo.lpi
r90 r91 38 38 </Item2> 39 39 </RequiredPackages> 40 <Units Count="9 4">40 <Units Count="95"> 41 41 <Unit0> 42 42 <Filename Value="Demo.lpr"/> … … 46 46 <TopLine Value="1"/> 47 47 <CursorPos X="26" Y="8"/> 48 <UsageCount Value="6 4"/>48 <UsageCount Value="65"/> 49 49 <DefaultSyntaxHighlighter Value="Delphi"/> 50 50 </Unit0> … … 55 55 <ResourceBaseClass Value="Form"/> 56 56 <UnitName Value="UMainForm"/> 57 <IsVisibleTab Value="True"/>58 57 <EditorIndex Value="0"/> 59 58 <WindowIndex Value="0"/> 60 <TopLine Value=" 1"/>61 <CursorPos X=" 15" Y="33"/>62 <UsageCount Value="6 4"/>59 <TopLine Value="316"/> 60 <CursorPos X="21" Y="332"/> 61 <UsageCount Value="65"/> 63 62 <Loaded Value="True"/> 64 63 <LoadedDesigner Value="True"/> … … 659 658 <CursorPos X="57" Y="57"/> 660 659 <UsageCount Value="10"/> 661 <DefaultSyntaxHighlighter Value="Delphi"/>662 660 </Unit75> 663 661 <Unit76> … … 679 677 <Unit78> 680 678 <Filename Value="../Generic/GenericList.inc"/> 681 <EditorIndex Value="16"/> 682 <WindowIndex Value="0"/> 683 <TopLine Value="58"/> 684 <CursorPos X="86" Y="71"/> 679 <IsVisibleTab Value="True"/> 680 <EditorIndex Value="15"/> 681 <WindowIndex Value="0"/> 682 <TopLine Value="307"/> 683 <CursorPos X="24" Y="307"/> 685 684 <UsageCount Value="14"/> 686 685 <Loaded Value="True"/> … … 688 687 <Unit79> 689 688 <Filename Value="../Generic/GenericDictionary.inc"/> 690 <EditorIndex Value=" 3"/>691 <WindowIndex Value="0"/> 692 <TopLine Value=" 1"/>693 <CursorPos X=" 1" Y="10"/>689 <EditorIndex Value="1"/> 690 <WindowIndex Value="0"/> 691 <TopLine Value="31"/> 692 <CursorPos X="44" Y="47"/> 694 693 <UsageCount Value="14"/> 695 694 <Loaded Value="True"/> … … 697 696 <Unit80> 698 697 <Filename Value="../Generic/GenericObjectList.inc"/> 699 <EditorIndex Value=" 5"/>700 <WindowIndex Value="0"/> 701 <TopLine Value=" 34"/>702 <CursorPos X=" 8" Y="56"/>698 <EditorIndex Value="3"/> 699 <WindowIndex Value="0"/> 700 <TopLine Value="1"/> 701 <CursorPos X="36" Y="48"/> 703 702 <UsageCount Value="14"/> 704 703 <Loaded Value="True"/> … … 706 705 <Unit81> 707 706 <Filename Value="../Generic/GenericQueue.inc"/> 708 <EditorIndex Value=" 9"/>709 <WindowIndex Value="0"/> 710 <TopLine Value=" 1"/>707 <EditorIndex Value="7"/> 708 <WindowIndex Value="0"/> 709 <TopLine Value="21"/> 711 710 <CursorPos X="1" Y="3"/> 712 711 <UsageCount Value="14"/> … … 715 714 <Unit82> 716 715 <Filename Value="../Generic/GenericSet.inc"/> 717 <EditorIndex Value="1 4"/>718 <WindowIndex Value="0"/> 719 <TopLine Value=" 1"/>716 <EditorIndex Value="12"/> 717 <WindowIndex Value="0"/> 718 <TopLine Value="21"/> 720 719 <CursorPos X="42" Y="11"/> 721 720 <UsageCount Value="14"/> … … 724 723 <Unit83> 725 724 <Filename Value="../Generic/GenericStack.inc"/> 726 <EditorIndex Value="1 3"/>727 <WindowIndex Value="0"/> 728 <TopLine Value=" 1"/>725 <EditorIndex Value="11"/> 726 <WindowIndex Value="0"/> 727 <TopLine Value="21"/> 729 728 <CursorPos X="1" Y="3"/> 730 729 <UsageCount Value="14"/> … … 733 732 <Unit84> 734 733 <Filename Value="../Generic/GenericTree.inc"/> 735 <EditorIndex Value="1 5"/>734 <EditorIndex Value="13"/> 736 735 <WindowIndex Value="0"/> 737 736 <TopLine Value="1"/> … … 743 742 <Filename Value="../Specialized/SpecializedDictionary.pas"/> 744 743 <UnitName Value="SpecializedDictionary"/> 745 <EditorIndex Value=" 11"/>746 <WindowIndex Value="0"/> 747 <TopLine Value=" 1"/>748 <CursorPos X=" 1" Y="13"/>744 <EditorIndex Value="9"/> 745 <WindowIndex Value="0"/> 746 <TopLine Value="9"/> 747 <CursorPos X="56" Y="36"/> 749 748 <UsageCount Value="13"/> 750 749 <Loaded Value="True"/> … … 753 752 <Filename Value="../Specialized/SpecializedStack.pas"/> 754 753 <UnitName Value="SpecializedStack"/> 755 <EditorIndex Value="1 2"/>756 <WindowIndex Value="0"/> 757 <TopLine Value=" 1"/>758 <CursorPos X=" 1" Y="13"/>754 <EditorIndex Value="10"/> 755 <WindowIndex Value="0"/> 756 <TopLine Value="30"/> 757 <CursorPos X="50" Y="59"/> 759 758 <UsageCount Value="12"/> 760 759 <Loaded Value="True"/> … … 763 762 <Filename Value="../Specialized/SpecializedTree.pas"/> 764 763 <UnitName Value="SpecializedTree"/> 765 <EditorIndex Value=" 4"/>766 <WindowIndex Value="0"/> 767 <TopLine Value=" 1"/>768 <CursorPos X=" 1" Y="11"/>764 <EditorIndex Value="2"/> 765 <WindowIndex Value="0"/> 766 <TopLine Value="57"/> 767 <CursorPos X="48" Y="85"/> 769 768 <UsageCount Value="12"/> 770 769 <Loaded Value="True"/> … … 772 771 <Unit88> 773 772 <Filename Value="../Generic/GenericRange.inc"/> 774 <EditorIndex Value=" 10"/>773 <EditorIndex Value="8"/> 775 774 <WindowIndex Value="0"/> 776 775 <TopLine Value="1"/> … … 782 781 <Filename Value="../Specialized/SpecializedQueue.pas"/> 783 782 <UnitName Value="SpecializedQueue"/> 784 <EditorIndex Value=" 6"/>785 <WindowIndex Value="0"/> 786 <TopLine Value=" 1"/>787 <CursorPos X="1" Y=" 13"/>783 <EditorIndex Value="4"/> 784 <WindowIndex Value="0"/> 785 <TopLine Value="52"/> 786 <CursorPos X="1" Y="81"/> 788 787 <UsageCount Value="12"/> 789 788 <Loaded Value="True"/> … … 792 791 <Filename Value="../Specialized/SpecializedSet.pas"/> 793 792 <UnitName Value="SpecializedSet"/> 794 <EditorIndex Value=" 8"/>795 <WindowIndex Value="0"/> 796 <TopLine Value=" 1"/>797 <CursorPos X="1" Y=" 13"/>793 <EditorIndex Value="6"/> 794 <WindowIndex Value="0"/> 795 <TopLine Value="31"/> 796 <CursorPos X="1" Y="62"/> 798 797 <UsageCount Value="12"/> 799 798 <Loaded Value="True"/> … … 801 800 <Unit91> 802 801 <Filename Value="../Generic/GenericPoint.inc"/> 803 <EditorIndex Value="1"/>804 802 <WindowIndex Value="0"/> 805 803 <TopLine Value="1"/> 806 804 <CursorPos X="33" Y="5"/> 807 805 <UsageCount Value="11"/> 808 <Loaded Value="True"/>809 806 </Unit91> 810 807 <Unit92> 811 808 <Filename Value="../Specialized/SpecializedPoint.pas"/> 812 809 <UnitName Value="SpecializedPoint"/> 813 <EditorIndex Value="2"/>814 810 <WindowIndex Value="0"/> 815 811 <TopLine Value="1"/> 816 812 <CursorPos X="1" Y="1"/> 817 813 <UsageCount Value="11"/> 818 <Loaded Value="True"/>819 814 </Unit92> 820 815 <Unit93> 821 816 <Filename Value="../Specialized/SpecializedObjectList.pas"/> 822 817 <UnitName Value="SpecializedObjectList"/> 823 <EditorIndex Value=" 7"/>824 <WindowIndex Value="0"/> 825 <TopLine Value=" 1"/>826 <CursorPos X=" 1" Y="1"/>818 <EditorIndex Value="5"/> 819 <WindowIndex Value="0"/> 820 <TopLine Value="9"/> 821 <CursorPos X="60" Y="36"/> 827 822 <UsageCount Value="11"/> 828 823 <Loaded Value="True"/> 829 824 </Unit93> 825 <Unit94> 826 <Filename Value="../Specialized/SpecializedList.pas"/> 827 <UnitName Value="SpecializedList"/> 828 <EditorIndex Value="14"/> 829 <WindowIndex Value="0"/> 830 <TopLine Value="63"/> 831 <CursorPos X="54" Y="79"/> 832 <UsageCount Value="10"/> 833 <Loaded Value="True"/> 834 </Unit94> 830 835 </Units> 831 836 <JumpHistory Count="30" HistoryIndex="29"> 832 837 <Position1> 833 <Filename Value=" ../Specialized/SpecializedDictionary.pas"/>834 <Caret Line="1 9" Column="42" TopLine="1"/>838 <Filename Value="UMainForm.pas"/> 839 <Caret Line="188" Column="5" TopLine="168"/> 835 840 </Position1> 836 841 <Position2> 837 <Filename Value=" ../Specialized/SpecializedDictionary.pas"/>838 <Caret Line=" 18" Column="24" TopLine="1"/>842 <Filename Value="UMainForm.pas"/> 843 <Caret Line="393" Column="5" TopLine="364"/> 839 844 </Position2> 840 845 <Position3> 841 <Filename Value="../Specialized/Specialized Dictionary.pas"/>842 <Caret Line=" 19" Column="43" TopLine="1"/>846 <Filename Value="../Specialized/SpecializedQueue.pas"/> 847 <Caret Line="33" Column="32" TopLine="1"/> 843 848 </Position3> 844 849 <Position4> 845 <Filename Value="../Specialized/Specialized Dictionary.pas"/>846 <Caret Line=" 39" Column="5" TopLine="3"/>850 <Filename Value="../Specialized/SpecializedQueue.pas"/> 851 <Caret Line="20" Column="34" TopLine="1"/> 847 852 </Position4> 848 853 <Position5> 849 <Filename Value="../Specialized/Specialized Stack.pas"/>850 <Caret Line=" 19" Column="36" TopLine="1"/>854 <Filename Value="../Specialized/SpecializedDictionary.pas"/> 855 <Caret Line="22" Column="36" TopLine="1"/> 851 856 </Position5> 852 857 <Position6> 853 <Filename Value=" ../Specialized/SpecializedStack.pas"/>854 <Caret Line=" 5" Column="1" TopLine="1"/>858 <Filename Value="UMainForm.pas"/> 859 <Caret Line="469" Column="3" TopLine="439"/> 855 860 </Position6> 856 861 <Position7> 857 <Filename Value="../Generic/Generic Stack.inc"/>858 <Caret Line=" 28" Column="34" TopLine="13"/>862 <Filename Value="../Generic/GenericObjectList.inc"/> 863 <Caret Line="14" Column="55" TopLine="1"/> 859 864 </Position7> 860 865 <Position8> 861 866 <Filename Value="UMainForm.pas"/> 862 <Caret Line=" 9" Column="7" TopLine="1"/>867 <Caret Line="89" Column="20" TopLine="70"/> 863 868 </Position8> 864 869 <Position9> 865 <Filename Value=" UMainForm.pas"/>866 <Caret Line=" 10" Column="20" TopLine="1"/>870 <Filename Value="../Specialized/SpecializedDictionary.pas"/> 871 <Caret Line="22" Column="36" TopLine="1"/> 867 872 </Position9> 868 873 <Position10> 869 <Filename Value=" UMainForm.pas"/>870 <Caret Line=" 20" Column="49" TopLine="1"/>874 <Filename Value="../Generic/GenericTree.inc"/> 875 <Caret Line="33" Column="25" TopLine="12"/> 871 876 </Position10> 872 877 <Position11> 873 <Filename Value=" UMainForm.pas"/>874 <Caret Line=" 22" Column="35" TopLine="1"/>878 <Filename Value="../Specialized/SpecializedTree.pas"/> 879 <Caret Line="82" Column="5" TopLine="47"/> 875 880 </Position11> 876 881 <Position12> 877 882 <Filename Value="UMainForm.pas"/> 878 <Caret Line=" 110" Column="12" TopLine="81"/>883 <Caret Line="360" Column="51" TopLine="342"/> 879 884 </Position12> 880 885 <Position13> 881 <Filename Value=" UMainForm.pas"/>882 <Caret Line=" 133" Column="9" TopLine="103"/>886 <Filename Value="../Generic/GenericList.inc"/> 887 <Caret Line="71" Column="86" TopLine="58"/> 883 888 </Position13> 884 889 <Position14> 885 <Filename Value=" UMainForm.pas"/>886 <Caret Line="1 62" Column="7" TopLine="136"/>890 <Filename Value="../Generic/GenericList.inc"/> 891 <Caret Line="18" Column="42" TopLine="1"/> 887 892 </Position14> 888 893 <Position15> 889 <Filename Value=" UMainForm.pas"/>890 <Caret Line=" 171" Column="1" TopLine="152"/>894 <Filename Value="../Generic/GenericList.inc"/> 895 <Caret Line="6" Column="29" TopLine="1"/> 891 896 </Position15> 892 897 <Position16> 893 <Filename Value=" UMainForm.pas"/>894 <Caret Line="1 90" Column="7" TopLine="165"/>898 <Filename Value="../Generic/GenericList.inc"/> 899 <Caret Line="12" Column="37" TopLine="1"/> 895 900 </Position16> 896 901 <Position17> 897 <Filename Value=" UMainForm.pas"/>898 <Caret Line=" 188" Column="5" TopLine="168"/>902 <Filename Value="../Generic/GenericList.inc"/> 903 <Caret Line="377" Column="25" TopLine="359"/> 899 904 </Position17> 900 905 <Position18> 901 <Filename Value=" UMainForm.pas"/>902 <Caret Line="3 93" Column="5" TopLine="364"/>906 <Filename Value="../Generic/GenericList.inc"/> 907 <Caret Line="375" Column="57" TopLine="359"/> 903 908 </Position18> 904 909 <Position19> 905 <Filename Value="../ Specialized/SpecializedQueue.pas"/>906 <Caret Line="3 3" Column="32" TopLine="1"/>910 <Filename Value="../Generic/GenericList.inc"/> 911 <Caret Line="39" Column="14" TopLine="38"/> 907 912 </Position19> 908 913 <Position20> 909 <Filename Value="../ Specialized/SpecializedQueue.pas"/>910 <Caret Line=" 20" Column="34" TopLine="1"/>914 <Filename Value="../Generic/GenericList.inc"/> 915 <Caret Line="375" Column="77" TopLine="359"/> 911 916 </Position20> 912 917 <Position21> 913 <Filename Value="../ Specialized/SpecializedDictionary.pas"/>914 <Caret Line=" 22" Column="36" TopLine="1"/>918 <Filename Value="../Generic/GenericList.inc"/> 919 <Caret Line="8" Column="22" TopLine="1"/> 915 920 </Position21> 916 921 <Position22> 917 <Filename Value=" UMainForm.pas"/>918 <Caret Line="4 69" Column="3" TopLine="439"/>922 <Filename Value="../Generic/GenericList.inc"/> 923 <Caret Line="40" Column="22" TopLine="24"/> 919 924 </Position22> 920 925 <Position23> 921 <Filename Value="../Generic/Generic ObjectList.inc"/>922 <Caret Line=" 14" Column="55" TopLine="1"/>926 <Filename Value="../Generic/GenericList.inc"/> 927 <Caret Line="394" Column="60" TopLine="375"/> 923 928 </Position23> 924 929 <Position24> 925 <Filename Value=" UMainForm.pas"/>926 <Caret Line=" 89" Column="20" TopLine="70"/>930 <Filename Value="../Generic/GenericList.inc"/> 931 <Caret Line="396" Column="62" TopLine="375"/> 927 932 </Position24> 928 933 <Position25> 929 <Filename Value="../ Specialized/SpecializedDictionary.pas"/>930 <Caret Line=" 22" Column="36" TopLine="1"/>934 <Filename Value="../Generic/GenericList.inc"/> 935 <Caret Line="393" Column="26" TopLine="377"/> 931 936 </Position25> 932 937 <Position26> 933 <Filename Value="../Generic/Generic Tree.inc"/>934 <Caret Line="3 3" Column="25" TopLine="12"/>938 <Filename Value="../Generic/GenericList.inc"/> 939 <Caret Line="389" Column="87" TopLine="377"/> 935 940 </Position26> 936 941 <Position27> 937 <Filename Value=" ../Specialized/SpecializedTree.pas"/>938 <Caret Line=" 82" Column="5" TopLine="47"/>942 <Filename Value="UMainForm.pas"/> 943 <Caret Line="15" Column="35" TopLine="71"/> 939 944 </Position27> 940 945 <Position28> 941 946 <Filename Value="UMainForm.pas"/> 942 <Caret Line=" 360" Column="51" TopLine="342"/>947 <Caret Line="14" Column="1" TopLine="1"/> 943 948 </Position28> 944 949 <Position29> 945 <Filename Value="../Generic/Generic Point.inc"/>946 <Caret Line=" 6" Column="1" TopLine="1"/>950 <Filename Value="../Generic/GenericList.inc"/> 951 <Caret Line="24" Column="5" TopLine="23"/> 947 952 </Position29> 948 953 <Position30> 949 <Filename Value="../Generic/Generic Point.inc"/>950 <Caret Line=" 12" Column="62" TopLine="1"/>954 <Filename Value="../Generic/GenericList.inc"/> 955 <Caret Line="33" Column="21" TopLine="17"/> 951 956 </Position30> 952 957 </JumpHistory> … … 967 972 <AllowLabel Value="False"/> 968 973 <CPPInline Value="False"/> 974 <CStyleMacros Value="True"/> 969 975 </SyntaxOptions> 970 976 </Parsing> -
Generics/TemplateGenerics/Demo/UMainForm.lfm
r90 r91 4 4 Top = 121 5 5 Width = 478 6 ActiveControl = ButtonIntegerList 6 7 Caption = 'Template generics demo' 7 8 ClientHeight = 397 -
Generics/TemplateGenerics/Generic/GenericDictionary.inc
r86 r91 12 12 {$DEFINE TGList := TGDictionaryList} 13 13 {$DEFINE TGListSortCompare := TDictionarySortCompare} 14 {$DEFINE TGListStringConverter := TDictionaryStringConverter} 14 {$DEFINE TGListToStringConverter := TDictionaryToStringConverter} 15 {$DEFINE TGListFromStringConverter := TDictionaryFromStringConverter} 15 16 {$DEFINE INTERFACE} 16 17 {$I 'GenericList.inc'} … … 45 46 {$DEFINE TGList := TGDictionaryList} 46 47 {$DEFINE TGListSortCompare := TDictionarySortCompare} 47 {$DEFINE TGListStringConverter := TDictionaryStringConverter} 48 {$DEFINE TGListToStringConverter := TDictionaryToStringConverter} 49 {$DEFINE TGListFromStringConverter := TDictionaryFromStringConverter} 48 50 {$DEFINE IMPLEMENTATION} 49 51 {$I 'GenericList.inc'} -
Generics/TemplateGenerics/Generic/GenericList.inc
r90 r91 4 4 5 5 TGListSortCompare = function(const Item1, Item2: TGListItem): Integer of object; 6 TGList StringConverter = function(Item: TGListItem): string;7 //TGListNotification = (lnAdded, lnExtracted, lnDeleted);6 TGListToStringConverter = function(Item: TGListItem): string; 7 TGListFromStringConverter = function(Text: string): TGListItem; 8 8 9 9 // TGList<TGListIndex, TGListItem> = class … … 31 31 procedure Delete(Index: TGListIndex); virtual; 32 32 procedure DeleteItems(Index, Count: TGListIndex); 33 function Equal s(List: TGList): Boolean;33 function EqualTo(List: TGList): Boolean; 34 34 procedure Expand; 35 35 function Extract(Item: TGListItem): TGListItem; … … 37 37 property First: TGListItem read GetFirst write SetFirst; 38 38 procedure Fill(Start, Count: TGListIndex; Value: TGListItem); 39 function Implode(Separator: string; Converter: TGListStringConverter): string; 39 function Implode(Separator: string; Converter: TGListToStringConverter): string; 40 procedure Explode(Text, Separator: string; Converter: TGListFromStringConverter; SlicesCount: Integer = -1); 40 41 function IndexOf(Item: TGListItem; Start: TGListIndex = 0): TGListIndex; 41 42 function IndexOfList(List: TGList; Start: TGListIndex = 0): TGListIndex; … … 304 305 end; 305 306 306 function TGList.Equal s(List: TGList): Boolean;307 function TGList.EqualTo(List: TGList): Boolean; 307 308 var 308 309 I: TGListIndex; … … 372 373 end; 373 374 374 function TGList.Implode(Separator: string; Converter: TGList StringConverter): string;375 function TGList.Implode(Separator: string; Converter: TGListToStringConverter): string; 375 376 var 376 377 I: TGListIndex; … … 384 385 I := I + 1; 385 386 end; 387 end; 388 389 procedure TGList.Explode(Text, Separator: string; Converter: TGListFromStringConverter; SlicesCount: Integer = -1); 390 begin 391 Clear; 392 while (Pos(Separator, Text) > 0) and 393 ((Count < (SlicesCount - 1)) or (SlicesCount = -1)) do begin 394 Add(Converter(Copy(Text, 1, Pos(Separator, Text) - 1))); 395 System.Delete(Text, 1, Pos(Separator, Text) + Length(Separator) - 1); 396 end; 397 Add(Converter(Text)); 386 398 end; 387 399 -
Generics/TemplateGenerics/Generic/GenericObjectList.inc
r87 r91 5 5 {$DEFINE TGList := TGObjectListList} 6 6 {$DEFINE TGListSortCompare := TGObjectListSortCompare} 7 {$DEFINE TGListStringConverter := TGObjectListStringConverter} 7 {$DEFINE TGListToStringConverter := TGObjectListToStringConverter} 8 {$DEFINE TGListFromStringConverter := TGObjectListFromStringConverter} 8 9 {$DEFINE INTERFACE} 9 10 {$I 'GenericList.inc'} … … 38 39 {$DEFINE TGList := TGObjectListList} 39 40 {$DEFINE TGListSortCompare := TGObjectListSortCompare} 40 {$DEFINE TGListStringConverter := TGObjectListStringConverter} 41 {$DEFINE TGListToStringConverter := TGObjectListToStringConverter} 42 {$DEFINE TGListFromStringConverter := TGObjectListFromStringConverter} 41 43 {$DEFINE IMPLEMENTATION} 42 44 {$I 'GenericList.inc'} -
Generics/TemplateGenerics/Generic/GenericQueue.inc
r86 r91 5 5 {$DEFINE TGList := TGQueueList} 6 6 {$DEFINE TGListSortCompare := TGQueueSortCompare} 7 {$DEFINE TGListStringConverter := TGQueueStringConverter} 7 {$DEFINE TGListToStringConverter := TGQueueToStringConverter} 8 {$DEFINE TGListFromStringConverter := TGQueueFromStringConverter} 8 9 {$DEFINE INTERFACE} 9 10 {$I 'GenericList.inc'} … … 39 40 {$DEFINE TGList := TGQueueList} 40 41 {$DEFINE TGListSortCompare := TGQueueSortCompare} 41 {$DEFINE TGListStringConverter := TGQueueStringConverter} 42 {$DEFINE TGListToStringConverter := TGQueueToStringConverter} 43 {$DEFINE TGListFromStringConverter := TGQueueFromStringConverter} 42 44 {$DEFINE IMPLEMENTATION} 43 45 {$I 'GenericList.inc'} -
Generics/TemplateGenerics/Generic/GenericSet.inc
r86 r91 5 5 {$DEFINE TGList := TGSetList} 6 6 {$DEFINE TGListSortCompare := TGSetSortCompare} 7 {$DEFINE TGListStringConverter := TGSetStringConverter} 7 {$DEFINE TGListToStringConverter := TGSetToStringConverter} 8 {$DEFINE TGListFromStringConverter := TGSetFromStringConverter} 8 9 {$DEFINE INTERFACE} 9 10 {$I 'GenericList.inc'} … … 37 38 {$DEFINE TGList := TGSetList} 38 39 {$DEFINE TGListSortCompare := TGSetSortCompare} 39 {$DEFINE TGListStringConverter := TGSetStringConverter} 40 {$DEFINE TGListToStringConverter := TGSetToStringConverter} 41 {$DEFINE TGListFromStringConverter := TGSetFromStringConverter} 40 42 {$DEFINE IMPLEMENTATION} 41 43 {$I 'GenericList.inc'} -
Generics/TemplateGenerics/Generic/GenericStack.inc
r86 r91 5 5 {$DEFINE TGList := TGStackList} 6 6 {$DEFINE TGListSortCompare := TGStackSortCompare} 7 {$DEFINE TGListStringConverter := TGStackStringConverter} 7 {$DEFINE TGListToStringConverter := TGStackToStringConverter} 8 {$DEFINE TGListFromStringConverter := TGStackFromStringConverter} 8 9 {$DEFINE INTERFACE} 9 10 {$I 'GenericList.inc'} … … 38 39 {$DEFINE TGList := TGStackList} 39 40 {$DEFINE TGListSortCompare := TGStackSortCompare} 40 {$DEFINE TGListStringConverter := TGStackStringConverter} 41 {$DEFINE TGListToStringConverter := TGStackToStringConverter} 42 {$DEFINE TGListFromStringConverter := TGStackFromStringConverter} 41 43 {$DEFINE IMPLEMENTATION} 42 44 {$I 'GenericList.inc'} -
Generics/TemplateGenerics/Generic/GenericTree.inc
r86 r91 7 7 {$DEFINE TGList := TGTreeNodeList} 8 8 {$DEFINE TGListSortCompare := TGTreeSortCompare} 9 {$DEFINE TGListStringConverter := TGTreeStringConverter} 9 {$DEFINE TGListToStringConverter := TGTreeToStringConverter} 10 {$DEFINE TGListFromStringConverter := TGTreeFromStringConverter} 10 11 {$DEFINE INTERFACE} 11 12 {$I 'GenericList.inc'} … … 43 44 {$DEFINE TGList := TGTreeNodeList} 44 45 {$DEFINE TGListSortCompare := TGTreeSortCompare} 45 {$DEFINE TGListStringConverter := TGTreeStringConverter} 46 {$DEFINE TGListToStringConverter := TGTreeToStringConverter} 47 {$DEFINE TGListFromStringConverter := TGTreeFromStringConverter} 46 48 {$DEFINE IMPLEMENTATION} 47 49 {$I 'GenericList.inc'} -
Generics/TemplateGenerics/Specialized/SpecializedDictionary.pas
r86 r91 19 19 {$DEFINE TGDictionaryList := TDictionaryList} 20 20 {$DEFINE TGDictionarySortCompare := TDictionarySortCompareInteger} 21 {$DEFINE TGDictionaryStringConverter := TDictionaryStringConverterInteger} 21 {$DEFINE TGDictionaryToStringConverter := TDictionaryToStringConverterInteger} 22 {$DEFINE TGDictionaryFromStringConverter := TDictionaryFromStringConverterInteger} 22 23 {$DEFINE INTERFACE} 23 24 {$I 'GenericDictionary.inc'} … … 33 34 {$DEFINE TGDictionaryList := TDictionaryList} 34 35 {$DEFINE TGDictionarySortCompare := TDictionarySortCompareInteger} 35 {$DEFINE TGDictionaryStringConverter := TDictionaryStringConverterInteger} 36 {$DEFINE TGDictionaryToStringConverter := TDictionaryToStringConverterInteger} 37 {$DEFINE TGDictionaryFromStringConverter := TDictionaryFromStringConverterInteger} 36 38 {$DEFINE IMPLEMENTATION} 37 39 {$I 'GenericDictionary.inc'} -
Generics/TemplateGenerics/Specialized/SpecializedList.pas
r86 r91 16 16 {$DEFINE TGList := TListInteger} 17 17 {$DEFINE TGListSortCompare := TListIntegerSortCompare} 18 {$DEFINE TGListStringConverter := TListIntegerStringConverter} 18 {$DEFINE TGListToStringConverter := TListIntegerToStringConverter} 19 {$DEFINE TGListFromStringConverter := TListIntegerFromStringConverter} 19 20 {$DEFINE INTERFACE} 20 21 {$I 'GenericList.inc'} … … 25 26 {$DEFINE TGList := TListSmallInt} 26 27 {$DEFINE TGListSortCompare := TListSmallIntSortCompare} 27 {$DEFINE TGListStringConverter := TListSmallIntStringConverter} 28 {$DEFINE TGListToStringConverter := TListSmallIntToStringConverter} 29 {$DEFINE TGListFromStringConverter := TListSmallIntFromStringConverter} 28 30 {$DEFINE INTERFACE} 29 31 {$I 'GenericList.inc'} … … 34 36 {$DEFINE TGList := TListDouble} 35 37 {$DEFINE TGListSortCompare := TListDoubleSortCompare} 36 {$DEFINE TGListStringConverter := TListDoubleStringConverter} 38 {$DEFINE TGListToStringConverter := TListDoubleToStringConverter} 39 {$DEFINE TGListFromStringConverter := TListDoubleFromStringConverter} 37 40 {$DEFINE INTERFACE} 38 41 {$INCLUDE '..\Generic\GenericList.inc'} … … 43 46 {$DEFINE TGList := TListPointer} 44 47 {$DEFINE TGListSortCompare := TListPointerSortCompare} 45 {$DEFINE TGListStringConverter := TListPointerStringConverter} 48 {$DEFINE TGListToStringConverter := TListPointerToStringConverter} 49 {$DEFINE TGListFromStringConverter := TListPointerFromStringConverter} 46 50 {$DEFINE INTERFACE} 47 51 {$I 'GenericList.inc'} … … 52 56 {$DEFINE TGList := TListString} 53 57 {$DEFINE TGListSortCompare := TListStringSortCompare} 54 {$DEFINE TGListStringConverter := TListStringStringConverter} 58 {$DEFINE TGListToStringConverter := TListStringToStringConverter} 59 {$DEFINE TGListFromStringConverter := TListStringFromStringConverter} 55 60 {$DEFINE INTERFACE} 56 61 {$I 'GenericList.inc'} … … 61 66 {$DEFINE TGList := TListByte} 62 67 {$DEFINE TGListSortCompare := TListByteSortCompare} 63 {$DEFINE TGListStringConverter := TListByteStringConverter} 68 {$DEFINE TGListToStringConverter := TListByteToStringConverter} 69 {$DEFINE TGListFromStringConverter := TListByteFromStringConverter} 64 70 {$DEFINE INTERFACE} 65 71 {$I 'GenericList.inc'} … … 70 76 {$DEFINE TGList := TListCharBase} 71 77 {$DEFINE TGListSortCompare := TListSortCompareChar} 72 {$DEFINE TGListStringConverter := TListStringConverterChar} 78 {$DEFINE TGListToStringConverter := TListToStringConverterChar} 79 {$DEFINE TGListFromStringConverter := TListFromStringConverterChar} 73 80 {$DEFINE INTERFACE} 74 81 {$I 'GenericList.inc'} … … 95 102 {$DEFINE TGList:=TListInteger} 96 103 {$DEFINE TGListSortCompare:=TListIntegerSortCompare} 97 {$DEFINE TGListStringConverter:=TListIntegerStringConverter} 104 {$DEFINE TGListToStringConverter:=TListIntegerToStringConverter} 105 {$DEFINE TGListFromStringConverter:=TListIntegerFromStringConverter} 98 106 {$DEFINE IMPLEMENTATION} 99 107 {$I 'GenericList.inc'} … … 104 112 {$DEFINE TGList:=TListSmallInt} 105 113 {$DEFINE TGListSortCompare:=TListSmallIntSortCompare} 106 {$DEFINE TGListStringConverter:=TListSmallIntStringConverter} 114 {$DEFINE TGListToStringConverter:=TListSmallIntToStringConverter} 115 {$DEFINE TGListFromStringConverter:=TListSmallIntFromStringConverter} 107 116 {$DEFINE IMPLEMENTATION} 108 117 {$I 'GenericList.inc'} … … 113 122 {$DEFINE TGList := TListDouble} 114 123 {$DEFINE TGListSortCompare := TListDoubleSortCompare} 115 {$DEFINE TGListStringConverter := TListDoubleStringConverter} 124 {$DEFINE TGListToStringConverter := TListDoubleToStringConverter} 125 {$DEFINE TGListFromStringConverter := TListDoubleFromStringConverter} 116 126 {$DEFINE IMPLEMENTATION} 117 127 {$I 'GenericList.inc'} … … 122 132 {$DEFINE TGList := TListPointer} 123 133 {$DEFINE TGListSortCompare := TListPointerSortCompare} 124 {$DEFINE TGListStringConverter := TListPointerStringConverter} 134 {$DEFINE TGListToStringConverter := TListPointerToStringConverter} 135 {$DEFINE TGListFromStringConverter := TListPointerFromStringConverter} 125 136 {$DEFINE IMPLEMENTATION} 126 137 {$I 'GenericList.inc'} … … 131 142 {$DEFINE TGList := TListString} 132 143 {$DEFINE TGListSortCompare := TListStringSortCompare} 133 {$DEFINE TGListStringConverter := TListStringStringConverter} 144 {$DEFINE TGListToStringConverter := TListStringToStringConverter} 145 {$DEFINE TGListFromStringConverter := TListStringFromStringConverter} 134 146 {$DEFINE IMPLEMENTATION} 135 147 {$I 'GenericList.inc'} … … 140 152 {$DEFINE TGList := TListByte} 141 153 {$DEFINE TGListSortCompare := TListByteSortCompare} 142 {$DEFINE TGListStringConverter := TListByteStringConverter} 154 {$DEFINE TGListToStringConverter := TListByteToStringConverter} 155 {$DEFINE TGListFromStringConverter := TListByteFromStringConverter} 143 156 {$DEFINE IMPLEMENTATION} 144 157 {$I 'GenericList.inc'} … … 149 162 {$DEFINE TGList := TListCharBase} 150 163 {$DEFINE TGListSortCompare := TListSortCompareChar} 151 {$DEFINE TGListStringConverter := TListStringConverterChar} 164 {$DEFINE TGListToStringConverter := TListToStringConverterChar} 165 {$DEFINE TGListFromStringConverter := TListFromStringConverterChar} 152 166 {$DEFINE IMPLEMENTATION} 153 167 {$I 'GenericList.inc'} -
Generics/TemplateGenerics/Specialized/SpecializedObjectList.pas
r87 r91 17 17 {$DEFINE TGObjectList := TListObject} 18 18 {$DEFINE TGObjectListSortCompare := TObjectListSortCompareObject} 19 {$DEFINE TGObjectListStringConverter := TObjectListStringConverterObject} 19 {$DEFINE TGObjectListToStringConverter := TObjectListToStringConverterObject} 20 {$DEFINE TGObjectListFromStringConverter := TObjectListFromStringConverterObject} 20 21 {$DEFINE INTERFACE} 21 22 {$I 'GenericObjectList.inc'} … … 32 33 {$DEFINE TGObjectList := TListObject} 33 34 {$DEFINE TGObjectListSortCompare := TObjectListSortCompareObject} 34 {$DEFINE TGObjectListStringConverter := TObjectListStringConverterObject} 35 {$DEFINE TGObjectListToStringConverter := TObjectListToStringConverterObject} 36 {$DEFINE TGObjectListFromStringConverter := TObjectListFromStringConverterObject} 35 37 {$DEFINE IMPLEMENTATION} 36 38 {$I 'GenericObjectList.inc'} -
Generics/TemplateGenerics/Specialized/SpecializedQueue.pas
r86 r91 17 17 {$DEFINE TGQueueList := TQueueListInteger} 18 18 {$DEFINE TGQueueSortCompare := TQueueSortCompareInteger} 19 {$DEFINE TGQueueStringConverter := TQueueStringConverterInteger} 19 {$DEFINE TGQueueToStringConverter := TQueueToStringConverterInteger} 20 {$DEFINE TGQueueFromStringConverter := TQueueFromStringConverterInteger} 20 21 {$DEFINE INTERFACE} 21 22 {$I 'GenericQueue.inc'} … … 27 28 {$DEFINE TGQueueList := TQueueListPointer} 28 29 {$DEFINE TGQueueSortCompare := TQueueSortComparePointer} 29 {$DEFINE TGQueueStringConverter := TQueueStringConverterPointer} 30 {$DEFINE TGQueueToStringConverter := TQueueToStringConverterPointer} 31 {$DEFINE TGQueueFromStringConverter := TQueueFromStringConverterPointer} 30 32 {$DEFINE INTERFACE} 31 33 {$I 'GenericQueue.inc'} … … 37 39 {$DEFINE TGQueueList := TQueueListByte} 38 40 {$DEFINE TGQueueSortCompare := TQueueSortCompareByte} 39 {$DEFINE TGQueueStringConverter := TQueueStringConverterByte} 41 {$DEFINE TGQueueToStringConverter := TQueueToStringConverterByte} 42 {$DEFINE TGQueueFromStringConverter := TQueueFromStringConverterByte} 40 43 {$DEFINE INTERFACE} 41 44 {$I 'GenericQueue.inc'} … … 52 55 {$DEFINE TGQueueList := TQueueListInteger} 53 56 {$DEFINE TGQueueSortCompare := TQueueSortCompareInteger} 54 {$DEFINE TGQueueStringConverter := TQueueStringConverterInteger} 57 {$DEFINE TGQueueToStringConverter := TQueueToStringConverterInteger} 58 {$DEFINE TGQueueFromStringConverter := TQueueFromStringConverterInteger} 55 59 {$DEFINE IMPLEMENTATION} 56 60 {$I '..\Generic\GenericQueue.inc'} … … 62 66 {$DEFINE TGQueueList := TQueueListPointer} 63 67 {$DEFINE TGQueueSortCompare := TQueueSortComparePointer} 64 {$DEFINE TGQueueStringConverter := TQueueStringConverterPointer} 68 {$DEFINE TGQueueToStringConverter := TQueueToStringConverterPointer} 69 {$DEFINE TGQueueFromStringConverter := TQueueFromStringConverterPointer} 65 70 {$DEFINE IMPLEMENTATION} 66 71 {$I 'GenericQueue.inc'} … … 72 77 {$DEFINE TGQueueList := TQueueListByte} 73 78 {$DEFINE TGQueueSortCompare := TQueueSortCompareByte} 74 {$DEFINE TGQueueStringConverter := TQueueStringConverterByte} 79 {$DEFINE TGQueueToStringConverter := TQueueToStringConverterByte} 80 {$DEFINE TGQueueFromStringConverter := TQueueFromStringConverterByte} 75 81 {$DEFINE IMPLEMENTATION} 76 82 {$I 'GenericQueue.inc'} -
Generics/TemplateGenerics/Specialized/SpecializedSet.pas
r86 r91 17 17 {$DEFINE TGSet := TSetInteger} 18 18 {$DEFINE TGSetSortCompare := TSetSortCompareInteger} 19 {$DEFINE TGSetStringConverter := TSetStringConverterInteger} 19 {$DEFINE TGSetToStringConverter := TSetToStringConverterInteger} 20 {$DEFINE TGSetFromStringConverter := TSetFromStringConverterInteger} 20 21 {$DEFINE INTERFACE} 21 22 {$I 'GenericSet.inc'} … … 27 28 {$DEFINE TGSet := TSetPointer} 28 29 {$DEFINE TGSetSortCompare := TSetSortComparePointer} 29 {$DEFINE TGSetStringConverter := TSetStringConverterPointer} 30 {$DEFINE TGSetToStringConverter := TSetToStringConverterPointer} 31 {$DEFINE TGSetFromStringConverter := TSetFromStringConverterPointer} 30 32 {$DEFINE INTERFACE} 31 33 {$I 'GenericSet.inc'} … … 42 44 {$DEFINE TGSet := TSetInteger} 43 45 {$DEFINE TGSetSortCompare := TSetSortCompareInteger} 44 {$DEFINE TGSetStringConverter := TSetStringConverterInteger} 46 {$DEFINE TGSetToStringConverter := TSetToStringConverterInteger} 47 {$DEFINE TGSetFromStringConverter := TSetFromStringConverterInteger} 45 48 {$DEFINE IMPLEMENTATION} 46 49 {$I 'GenericSet.inc'} … … 52 55 {$DEFINE TGSet := TSetPointer} 53 56 {$DEFINE TGSetSortCompare := TSetSortComparePointer} 54 {$DEFINE TGSetStringConverter := TSetStringConverterPointer} 57 {$DEFINE TGSetToStringConverter := TSetToStringConverterPointer} 58 {$DEFINE TGSetFromStringConverter := TSetFromStringConverterPointer} 55 59 {$DEFINE IMPLEMENTATION} 56 60 {$I 'GenericSet.inc'} -
Generics/TemplateGenerics/Specialized/SpecializedStack.pas
r86 r91 17 17 {$DEFINE TGStack := TStackInteger} 18 18 {$DEFINE TGStackSortCompare := TStackSortCompareInteger} 19 {$DEFINE TGStackStringConverter := TStackStringConverterInteger} 19 {$DEFINE TGStackToStringConverter := TStackToStringConverterInteger} 20 {$DEFINE TGStackFromStringConverter := TStackFromStringConverterInteger} 20 21 {$DEFINE INTERFACE} 21 22 {$I 'GenericStack.inc'} … … 27 28 {$DEFINE TGStack := TStackPointer} 28 29 {$DEFINE TGStackSortCompare := TStackSortComparePointer} 29 {$DEFINE TGStackStringConverter := TStackStringConverterPointer} 30 {$DEFINE TGStackToStringConverter := TStackToStringConverterPointer} 31 {$DEFINE TGStackFromStringConverter := TStackFromStringConverterPointer} 30 32 {$DEFINE INTERFACE} 31 33 {$I 'GenericStack.inc'} … … 43 45 {$DEFINE TGStack := TStackInteger} 44 46 {$DEFINE TGStackSortCompare := TStackSortCompareInteger} 45 {$DEFINE TGStackStringConverter := TStackStringConverterInteger} 47 {$DEFINE TGStackToStringConverter := TStackToStringConverterInteger} 48 {$DEFINE TGStackFromStringConverter := TStackFromStringConverterInteger} 46 49 {$DEFINE IMPLEMENTATION} 47 50 {$I 'GenericStack.inc'} … … 53 56 {$DEFINE TGStack := TStackPointer} 54 57 {$DEFINE TGStackSortCompare := TStackSortComparePointer} 55 {$DEFINE TGStackStringConverter := TStackStringConverterPointer} 58 {$DEFINE TGStackToStringConverter := TStackToStringConverterPointer} 59 {$DEFINE TGStackFromStringConverter := TStackFromStringConverterPointer} 56 60 {$DEFINE IMPLEMENTATION} 57 61 {$I 'GenericStack.inc'} -
Generics/TemplateGenerics/Specialized/SpecializedTree.pas
r86 r91 17 17 {$DEFINE TGTreeNodeList := TTreeNodeListInteger} 18 18 {$DEFINE TGTreeSortCompare := TTreeSortCompareInteger} 19 {$DEFINE TGTreeStringConverter := TTreeStringConverterInteger} 19 {$DEFINE TGTreeToStringConverter := TTreeToStringConverterInteger} 20 {$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterInteger} 20 21 {$DEFINE INTERFACE} 21 22 {$I 'GenericTree.inc'} … … 28 29 {$DEFINE TGTreeNodeList := TTreeNodeListString} 29 30 {$DEFINE TGTreeSortCompare := TTreeSortCompareString} 30 {$DEFINE TGTreeStringConverter := TTreeStringConverterString} 31 {$DEFINE TGTreeToStringConverter := TTreeToStringConverterString} 32 {$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterString} 31 33 {$DEFINE INTERFACE} 32 34 {$I 'GenericTree.inc'} … … 39 41 {$DEFINE TGTreeNodeList := TTreeNodeListPointer} 40 42 {$DEFINE TGTreeSortCompare := TTreeSortComparePointer} 41 {$DEFINE TGTreeStringConverter := TTreeStringConverterPointer} 43 {$DEFINE TGTreeToStringConverter := TTreeToStringConverterPointer} 44 {$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterPointer} 42 45 {$DEFINE INTERFACE} 43 46 {$I 'GenericTree.inc'} … … 55 58 {$DEFINE TGTreeNodeList := TTreeNodeListInteger} 56 59 {$DEFINE TGTreeSortCompare := TTreeSortCompareInteger} 57 {$DEFINE TGTreeStringConverter := TTreeStringConverterInteger} 60 {$DEFINE TGTreeToStringConverter := TTreeToStringConverterInteger} 61 {$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterInteger} 58 62 {$DEFINE IMPLEMENTATION} 59 63 {$I 'GenericTree.inc'} … … 66 70 {$DEFINE TGTreeNodeList := TTreeNodeListString} 67 71 {$DEFINE TGTreeSortCompare := TTreeSortCompareString} 68 {$DEFINE TGTreeStringConverter := TTreeStringConverterString} 72 {$DEFINE TGTreeToStringConverter := TTreeToStringConverterString} 73 {$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterString} 69 74 {$DEFINE IMPLEMENTATION} 70 75 {$I 'GenericTree.inc'} … … 77 82 {$DEFINE TGTreeNodeList := TTreeNodeListPointer} 78 83 {$DEFINE TGTreeSortCompare := TTreeSortComparePointer} 79 {$DEFINE TGTreeStringConverter := TTreeStringConverterPointer} 84 {$DEFINE TGTreeToStringConverter := TTreeToStringConverterPointer} 85 {$DEFINE TGTreeFromStringConverter := TTreeFromStringConverterPointer} 80 86 {$DEFINE IMPLEMENTATION} 81 87 {$I 'GenericTree.inc'} -
Generics/TemplateGenerics/TemplateGenerics.lpk
r90 r91 19 19 <Description Value="Generic classes implemented as templates."/> 20 20 <Version Minor="2"/> 21 <Files Count="1 8">21 <Files Count="16"> 22 22 <Item1> 23 23 <Filename Value="ReadMe.txt"/> … … 84 84 <UnitName Value="SpecializedObjectList"/> 85 85 </Item16> 86 <Item17>87 <Filename Value="Generic\GenericPoint.inc"/>88 </Item17>89 <Item18>90 <Filename Value="Specialized\SpecializedPoint.pas"/>91 <UnitName Value="SpecializedPoint"/>92 </Item18>93 86 </Files> 94 87 <Type Value="RunAndDesignTime"/> -
Generics/TemplateGenerics/TemplateGenerics.pas
r90 r91 9 9 uses 10 10 SpecializedList, SpecializedDictionary, SpecializedStack, SpecializedTree, 11 SpecializedQueue, SpecializedSet, SpecializedObjectList, SpecializedPoint, 12 LazarusPackageIntf; 11 SpecializedQueue, SpecializedSet, SpecializedObjectList, LazarusPackageIntf; 13 12 14 13 implementation
Note:
See TracChangeset
for help on using the changeset viewer.