casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::DisplayEvent Class Reference

Class describing the most basic event information in the display classes. More...

#include <DisplayEvent.h>

Inheritance diagram for casa::DisplayEvent:
casa::DisplayDataEvent casa::PixelCanvasEvent casa::ResetCrosshairEvent casa::ResetRTRegionEvent casa::WorldCanvasEvent casa::DDModEvent casa::PCMotionEvent casa::PCRefreshEvent casa::CrosshairEvent casa::RectRegionEvent casa::WCMotionEvent casa::WCRefreshEvent casa::PCPositionEvent casa::WCPositionEvent

List of all members.

Public Member Functions

 DisplayEvent ()
 Constructor.
 DisplayEvent (const DisplayEvent &other)
 Copy constructor - construct a new DisplayEvent from other.
virtual ~DisplayEvent ()
 Destructor.
DisplayEventoperator= (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.

Detailed Description

Class describing the most basic event information in the display classes.

Intended use:

Internal

Review Status

Reviewed By:
Ralph Marson
Date Reviewed:
2000/04/07
Test programs:
tDisplayEvent

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.

Definition at line 82 of file DisplayEvent.h.


Constructor & Destructor Documentation

Constructor.

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

Copy constructor - construct a new DisplayEvent from other.

virtual casa::DisplayEvent::~DisplayEvent ( ) [virtual]

Destructor.


Member Function Documentation

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.


Member Data Documentation

Store the time of the event here at construction.

Definition at line 107 of file DisplayEvent.h.


The documentation for this class was generated from the following file: