Ignore:
Timestamp:
Feb 20, 2012, 12:48:51 PM (13 years ago)
Author:
chronos
Message:
  • Added: Generic Rectangle class TGRectangle<TDimension>. Introduced specialized classes TRectangleInteger, TRectangleSmallInt, TRectangleSingle, TRectangleDouble.
  • TemplateGenerics version raised to 0.4.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Generics/TemplateGenerics/Specialized/SpecializedPoint.pas

    r101 r333  
    1111
    1212type
    13   TPoint2DIndex = (piX, piY);
    14 
    15 // TPoint2D<TPoint2DIndex, Integer>
    16 {$DEFINE TGPointIndex := TPoint2DIndex}
     13// TPoint<Integer>
    1714{$DEFINE TGPointType := Integer}
    18 {$DEFINE TGPoint := TPoint2D}
     15{$DEFINE TGPoint := TPoint}
    1916{$DEFINE INTERFACE}
    2017{$I 'GenericPoint.inc'}
     18
     19// TSmallPoint<SmallInt>
     20{$DEFINE TGPointType := SmallInt}
     21{$DEFINE TGPoint := TSmallPoint}
     22{$DEFINE INTERFACE}
     23{$I 'GenericPoint.inc'}
     24
     25// TPointSingle<Single>
     26{$DEFINE TGPointType := Single}
     27{$DEFINE TGPoint := TPointSingle}
     28{$DEFINE INTERFACE}
     29{$I 'GenericPoint.inc'}
     30
     31// TPointDouble<Double>
     32{$DEFINE TGPointType := Double}
     33{$DEFINE TGPoint := TPointDouble}
     34{$DEFINE INTERFACE}
     35{$I 'GenericPoint.inc'}
     36
    2137implementation
    2238
    23 // TPoint2D<TPoint2DIndex, Integer>
    24 {$DEFINE TGPointIndex := T2DPointIndex}
     39// TPoint<Integer>
    2540{$DEFINE TGPointType := Integer}
    26 {$DEFINE TGPoint := TPoint2D}
     41{$DEFINE TGPoint := TPoint}
    2742{$DEFINE IMPLEMENTATION}
    2843{$I 'GenericPoint.inc'}
    2944
     45// TSmallPoint<SmallInt>
     46{$DEFINE TGPointType := SmallInt}
     47{$DEFINE TGPoint := TSmallPoint}
     48{$DEFINE IMPLEMENTATION}
     49{$I 'GenericPoint.inc'}
     50
     51// TPointSingle<Single>
     52{$DEFINE TGPointType := Single}
     53{$DEFINE TGPoint := TPointSingle}
     54{$DEFINE IMPLEMENTATION}
     55{$I 'GenericPoint.inc'}
     56
     57// TPointDouble<Double>
     58{$DEFINE TGPointType := Double}
     59{$DEFINE TGPoint := TPointDouble}
     60{$DEFINE IMPLEMENTATION}
     61{$I 'GenericPoint.inc'}
    3062end.
    3163
Note: See TracChangeset for help on using the changeset viewer.