casa
$Rev:20696$
|
00001 //# DisplayDataEvent.h: base class for events sent by DisplayDatas 00002 //# Copyright (C) 2003 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Id$ 00027 00028 #ifndef TRIALDISPLAY_DISPLAYDATAEVENT_H 00029 #define TRIALDISPLAY_DISPLAYDATAEVENT_H 00030 00031 #include <casa/aips.h> 00032 #include <display/DisplayEvents/DisplayEvent.h> 00033 00034 namespace casa { //# NAMESPACE CASA - BEGIN 00035 00036 class DisplayData; 00037 00038 // <summary> 00039 // Class for events sent by DisplayDatas 00040 // </summary> 00041 00042 // <use visibility=local> 00043 00044 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos=""> 00045 // </reviewed> 00046 00047 // <etymology> 00048 // "DisplayDataEvents" describes "Events" (ie. things which happen at a 00049 // measurable time) which are sent by DisplayDatas. 00050 // </etymology> 00051 00052 // <prerequisite> 00053 // <li> <linkto class=DisplayEvent>DisplayEvent</linkto> 00054 // </prerequisite> 00055 00056 // <synopsis> 00057 // This class adds to the information stored in the <linkto 00058 // class=DisplayEvent>DisplayEvent</linkto> class. It adds a pointer 00059 // to the DisplayData itself. 00060 // </synopsis> 00061 00062 // <example> 00063 // </example> 00064 00065 // <motivation> 00066 // There was a need for events that can be sent by display datas to 00067 // signal modifications. DisplayEHs can listen to these events from 00068 // any display data that transmits DisplayDataEvents 00069 // </motivation> 00070 00071 // <thrown> 00072 // None. 00073 // </thrown> 00074 00075 // <todo asof="1999/10/15"> 00076 // None. 00077 // </todo> 00078 00079 class DisplayDataEvent : public DisplayEvent { 00080 00081 public: 00082 00083 // Constructor, taking a pointer to a constant DD. 00084 DisplayDataEvent(DisplayData* dd); 00085 00086 // Destructor. 00087 virtual ~DisplayDataEvent(); 00088 00089 // Return a pointer to the DD that generated the event. 00090 virtual DisplayData *displayData() const { 00091 return itsDisplayData; 00092 } 00093 00094 protected: 00095 00096 // (Required) default constructor. 00097 DisplayDataEvent(); 00098 00099 // (Required) copy constructor. 00100 DisplayDataEvent(const DisplayDataEvent &other); 00101 00102 // (Required) copy assignment. 00103 DisplayDataEvent &operator=(const DisplayDataEvent &other); 00104 00105 private: 00106 00107 // Store the DisplayData of the event here at construction. 00108 DisplayData *itsDisplayData; 00109 00110 }; 00111 00112 00113 } //# NAMESPACE CASA - END 00114 00115 #endif