casa
$Rev:20696$
|
Class describing the most basic event information in the display classes. More...
#include <DisplayEvent.h>
Public Member Functions | |
DisplayEvent () | |
Constructor. | |
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. | |
Private Attributes | |
Double | itsTimeOfEvent |
Store the time of the event here at construction. |
Class describing the most basic event information in the display classes.
Internal
"DisplayEvent" describes "Events" (ie. things which happen at a measurable time) which various "Display" class objects would like to know about.
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.
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!")); }
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.
Definition at line 82 of file DisplayEvent.h.
Constructor.
The Julian date at construction is recorded as the event time of this DisplayEvent.
casa::DisplayEvent::DisplayEvent | ( | const DisplayEvent & | other | ) |
Copy constructor - construct a new DisplayEvent from other
.
virtual casa::DisplayEvent::~DisplayEvent | ( | ) | [virtual] |
Destructor.
DisplayEvent& casa::DisplayEvent::operator= | ( | const DisplayEvent & | other | ) |
Copy assignment using copy semantics.
virtual Double casa::DisplayEvent::timeOfEvent | ( | ) | const [virtual] |
Return the Julian date (in fractional seconds) that this event occured.
Double casa::DisplayEvent::itsTimeOfEvent [private] |
Store the time of the event here at construction.
Definition at line 107 of file DisplayEvent.h.