Ignore:
Timestamp:
Jul 27, 2009, 3:19:14 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Objektová třída TPoint, TDouble.
Location:
ObjectBaseTypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ObjectBaseTypes

    • Property svn:ignore
      •  

        old new  
        33TestApplication.res
        44*.dcu
         5*.~dsk
  • ObjectBaseTypes/UObjectBoolean.pas

    r3 r4  
    1111  IComparable = interface
    1212    function EqualTo(Operand: TInterfacedObject): TBoolean;
    13     function HigherThen(Operand: TInterfacedObject): TBoolean;
    14     function LowerThan(Operand: TInterfacedObject): TBoolean;
    1513  end;
    1614
    17   TBoolean = class(TInterfacedObject, IAssignable, IComparable, IOrdinal)
     15  TBoolean = class(TInterfacedObject, IComparable, IAssignable)
    1816    Value: Boolean;
    19     function Ordinal: IOrdinal;
    20     function Predecessor: IOrdinal;
    21     function Successor: IOrdinal;
    22     function Low: IOrdinal;
    23     function High: IOrdinal;
    2417    procedure Invert;
    2518    function EqualTo(Operand: TInterfacedObject): TBoolean;
     
    6154end;
    6255
    63 function TBoolean.High: IOrdinal;
    64 begin
    65   Result := TBoolean.Create;
    66   TBoolean(Result).Value := True;
    67 end;
    68 
    6956function TBoolean.HigherThen(Operand: TInterfacedObject): TBoolean;
    7057begin
     
    8067end;
    8168
    82 function TBoolean.Low: IOrdinal;
    83 begin
    84   Result := TBoolean.Create;
    85   TBoolean(Result).Value := False;
    86 end;
    87 
    8869function TBoolean.LowerThan(Operand: TInterfacedObject): TBoolean;
    8970begin
     
    9273    Result.Value := Value < TBoolean(Operand).Value;
    9374  end else raise EInvalidCast.Create('Typecast error');
    94 end;
    95 
    96 function TBoolean.Ordinal: IOrdinal;
    97 begin
    98   Result := TInteger.Create;
    99   TInteger(Result).Value := Integer(Value);
    10075end;
    10176
     
    10883end;
    10984
    110 function TBoolean.Predecessor: IOrdinal;
    111 begin
    112   raise ENotImplemented.Create('Not implemented');
    113 end;
    114 
    115 function TBoolean.Successor: IOrdinal;
    116 begin
    117 
    118 end;
    11985
    12086end.
Note: See TracChangeset for help on using the changeset viewer.