DisplayEvent.h

Classes

DisplayEvent -- Class describing the most basic event information in the display classes. (full description)

class DisplayEvent

Interface

Public Members
DisplayEvent()
DisplayEvent(const DisplayEvent &other)
virtual ~DisplayEvent()
DisplayEvent &operator=(const DisplayEvent &other)
virtual Double timeOfEvent() const

Description

Review Status

Reviewed By:
Ralph Marson
Date Reviewed:
2000/04/07
Programs:
Tests:

Etymology

"DisplayEvent" describes "Events" (ie. things which happen at a measurable time) which various "Display" class objects would like to know about.

Synopsis

This class is a simple class which provides the base for all event information in the display classes. It simply records the one thing common to all events: the time the event occured. The time recorded is the Julian date at the time of construction of a DisplayEvent object, stored and returned in seconds.

Synopsis

Example

The following example constructs two DisplayEvent instances, and checks that they have stored event times that are ordered correctly by the order in which they were constructed:
    DisplayEvent *de1, *de2;
    de1 = new DisplayEvent();
    de2 = new DisplayEvent();
    if (de1.timeOfEvent() >= de2.timeOfEvent()) {
        throw(AipsError("I have invented a time machine!"));
    }
    

Motivation

It is desirable to locate in a single place the information common to all events of interest to the display classes. At the very lowest level, the only such common information is time data.

To Do

Member Description

DisplayEvent()

Constructor. The Julian date at construction is recorded as the event time of this DisplayEvent.

DisplayEvent(const DisplayEvent &other)

Copy constructor - construct a new DisplayEvent from other.

virtual ~DisplayEvent()

Destructor.

DisplayEvent &operator=(const DisplayEvent &other)

Copy assignment using copy semantics.

virtual Double timeOfEvent() const

Return the Julian date (in fractional seconds) that this event occured.