Changeset 301


Ignore:
Timestamp:
Dec 5, 2011, 2:19:01 PM (13 years ago)
Author:
chronos
Message:
  • Added: Another specilaized generic Dictionary.
Location:
Generics/TemplateGenerics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Generics/TemplateGenerics/Generic/GenericDictionary.inc

    r112 r301  
    1111{$DEFINE TGListItem := TGPair}
    1212{$DEFINE TGList := TGDictionaryList}
    13 {$DEFINE TGListSortCompare := TDictionarySortCompare}
    14 {$DEFINE TGListToStringConverter := TDictionaryToStringConverter}
    15 {$DEFINE TGListFromStringConverter := TDictionaryFromStringConverter}
    16 {$DEFINE TGListItemArray := TDictionaryItemArray}
     13{$DEFINE TGListSortCompare := TGDictionarySortCompare}
     14{$DEFINE TGListToStringConverter := TGDictionaryToStringConverter}
     15{$DEFINE TGListFromStringConverter := TGDictionaryFromStringConverter}
     16{$DEFINE TGListItemArray := TGDictionaryItemArray}
    1717{$DEFINE INTERFACE}
    1818{$I 'GenericList.inc'}
     
    3737{$ENDIF}
    3838
     39
     40{$IFDEF IMPLEMENTATION_USES}
     41{$I '..\Generic\GenericList.inc'}
     42{$UNDEF IMPLEMENTATION_USES}
     43{$ENDIF}
     44
     45
    3946{$IFDEF IMPLEMENTATION}
    40 
    41 {$UNDEF IMPLEMENTATION}
    42 {$DEFINE IMPLEMENTATION_USES}
    43 {$I '..\Generic\GenericList.inc'}
    4447
    4548{$DEFINE TGListIndex := TGDictionaryIndex}
    4649{$DEFINE TGListItem := TGPair}
    4750{$DEFINE TGList := TGDictionaryList}
    48 {$DEFINE TGListSortCompare := TDictionarySortCompare}
    49 {$DEFINE TGListToStringConverter := TDictionaryToStringConverter}
    50 {$DEFINE TGListFromStringConverter := TDictionaryFromStringConverter}
    51 {$DEFINE TGListItemArray := TDictionaryItemArray}
     51{$DEFINE TGListSortCompare := TGDictionarySortCompare}
     52{$DEFINE TGListToStringConverter := TGDictionaryToStringConverter}
     53{$DEFINE TGListFromStringConverter := TGDictionaryFromStringConverter}
     54{$DEFINE TGListItemArray := TGDictionaryItemArray}
    5255{$DEFINE IMPLEMENTATION}
    5356{$I 'GenericList.inc'}
  • Generics/TemplateGenerics/Specialized/SpecializedDictionary.pas

    r112 r301  
    1717{$DEFINE TGPairValue := string}
    1818{$DEFINE TGDictionary := TDictionaryStringString}
    19 {$DEFINE TGDictionaryList := TDictionaryList}
    20 {$DEFINE TGDictionarySortCompare := TDictionarySortCompareInteger}
    21 {$DEFINE TGDictionaryToStringConverter := TDictionaryToStringConverterInteger}
    22 {$DEFINE TGDictionaryFromStringConverter := TDictionaryFromStringConverterInteger}
    23 {$DEFINE TGDictionaryItemArray := TDictionaryStringItemArray}
     19{$DEFINE TGDictionaryList := TDictionaryStringStringList}
     20{$DEFINE TGDictionarySortCompare := TDictionaryStringStringSortCompare}
     21{$DEFINE TGDictionaryToStringConverter := TDictionaryStringStringToStringConverter}
     22{$DEFINE TGDictionaryFromStringConverter := TDictionaryStringStringFromStringConverter}
     23{$DEFINE TGDictionaryItemArray := TDictionaryStringStringItemArray}
    2424{$DEFINE INTERFACE}
    2525{$I 'GenericDictionary.inc'}
    2626
     27// TDictionaryIntegerString<Integer, TPair<Integer, string>>
     28{$DEFINE TGDictionaryIndex := Integer}
     29{$DEFINE TGPair := TPairIntegerString}
     30{$DEFINE TGPairKey := Integer}
     31{$DEFINE TGPairValue := string}
     32{$DEFINE TGDictionary := TDictionaryIntegerString}
     33{$DEFINE TGDictionaryList := TDictionaryIntegerStringList}
     34{$DEFINE TGDictionarySortCompare := TDictionaryIntegerStringSortCompare}
     35{$DEFINE TGDictionaryToStringConverter := TDictionaryIntegerStringToStringConverter}
     36{$DEFINE TGDictionaryFromStringConverter := TDictionaryIntegerStringFromStringConverter}
     37{$DEFINE TGDictionaryItemArray := TDictionaryIntegerStringItemArray}
     38{$DEFINE INTERFACE}
     39{$I 'GenericDictionary.inc'}
     40
     41
    2742implementation
     43
     44{$DEFINE IMPLEMENTATION_USES}
     45{$I '..\Generic\GenericDictionary.inc'}
     46
    2847
    2948// TDictionaryStringString<Integer, TPair<string, string>>
     
    3352{$DEFINE TGPairValue := string}
    3453{$DEFINE TGDictionary := TDictionaryStringString}
    35 {$DEFINE TGDictionaryList := TDictionaryList}
    36 {$DEFINE TGDictionarySortCompare := TDictionarySortCompareInteger}
    37 {$DEFINE TGDictionaryToStringConverter := TDictionaryToStringConverterInteger}
    38 {$DEFINE TGDictionaryFromStringConverter := TDictionaryFromStringConverterInteger}
    39 {$DEFINE TGDictionaryItemArray := TDictionaryStringItemArray}
     54{$DEFINE TGDictionaryList := TDictionaryStringStringList}
     55{$DEFINE TGDictionarySortCompare := TDictionaryStringStringSortCompare}
     56{$DEFINE TGDictionaryToStringConverter := TDictionaryStringStringToStringConverter}
     57{$DEFINE TGDictionaryFromStringConverter := TDictionaryStringStringFromStringConverter}
     58{$DEFINE TGDictionaryItemArray := TDictionaryStringStringItemArray}
    4059{$DEFINE IMPLEMENTATION}
    4160{$I 'GenericDictionary.inc'}
    4261
     62// TDictionaryIntegerString<Integer, TPair<Integer, string>>
     63{$DEFINE TGDictionaryIndex := Integer}
     64{$DEFINE TGPair := TPairIntegerString}
     65{$DEFINE TGPairKey := Integer}
     66{$DEFINE TGPairValue := string}
     67{$DEFINE TGDictionary := TDictionaryIntegerString}
     68{$DEFINE TGDictionaryList := TDictionaryIntegerStringList}
     69{$DEFINE TGDictionarySortCompare := TDictionaryIntegerStringSortCompare}
     70{$DEFINE TGDictionaryToStringConverter := TDictionaryIntegerStringToStringConverter}
     71{$DEFINE TGDictionaryFromStringConverter := TDictionaryIntegerStringFromStringConverter}
     72{$DEFINE TGDictionaryItemArray := TDictionaryIntegerStringItemArray}
     73{$DEFINE IMPLEMENTATION}
     74{$I 'GenericDictionary.inc'}
     75
     76
    4377end.
Note: See TracChangeset for help on using the changeset viewer.