Category : Pascal Source Code
Archive   : DATELINK.ZIP
Filename : DATEOBJ.PAS

 
Output of file : DATEOBJ.PAS contained in archive : DATELINK.ZIP

{$I DMINUS.INC}
{$O+} {so we can overlay this unit if we decide to}

UNIT DateObj;

{Linked list holds dates in ascending order.}


INTERFACE {section}

USES
TpDate,
Objects;


TYPE
DateObjectPtr = ^DateObject;
DateObject
= OBJECT(Node)
TheDate : Date;

CONSTRUCTOR Init(NewDate : Date);
FUNCTION GetDate : Date;
FUNCTION SelfPtr : DateObjectPtr
END;


IMPLEMENTATION {section}


{============================================================================}
CONSTRUCTOR DateObject.Init(NewDate : Date);

{Initialize the DateObject.}

BEGIN {DateObject.Init}
TheDate := NewDate;

END; {DateObject.Init}
{============================================================================}

{============================================================================}
FUNCTION DateObject.GetDate : Date;

{Return the Date from the object.}

BEGIN {GetDate}
GetDate := TheDate
END; {GetDate}
{============================================================================}

{============================================================================}
FUNCTION DateObject.SelfPtr : DateObjectPtr;

{Returns a pointer to this object.}

BEGIN {SelfPtr}
SelfPtr := @Self
END; {SelfPtr}
{============================================================================}


END. {DateObj}