casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
casa::DDModEvent Class Reference

Class used by DisplayDatas to signal change in data. More...

#include <DDModEvent.h>

Inheritance diagram for casa::DDModEvent:
casa::DisplayDataEvent casa::DisplayEvent

Public Member Functions

 DDModEvent (DisplayData *dd, const casacore::Record *rec)
 Constructor, taking a pointer to a DisplayData and a pointer to a data record. More...
 
virtual ~DDModEvent ()
 Destructor. More...
 
virtual const casacore::RecorddataRecord () const
 Return a pointer to the data record. More...
 
- Public Member Functions inherited from casa::DisplayDataEvent
 DisplayDataEvent (DisplayData *dd)
 Constructor, taking a pointer to a constant DD. More...
 
virtual ~DisplayDataEvent ()
 Destructor. More...
 
virtual DisplayDatadisplayData () const
 Return a pointer to the DD that generated the event. More...
 
- Public Member Functions inherited from casa::DisplayEvent
 DisplayEvent ()
 Constructor. More...
 
 DisplayEvent (const DisplayEvent &other)
 Copy constructor - construct a new DisplayEvent from other. More...
 
virtual ~DisplayEvent ()
 Destructor. More...
 
DisplayEventoperator= (const DisplayEvent &other)
 Copy assignment using copy semantics. More...
 
virtual casacore::Double timeOfEvent () const
 Return the Julian date (in fractional seconds) that this event occured. More...
 

Protected Member Functions

 DDModEvent ()
 (Required) default constructor. More...
 
 DDModEvent (const DDModEvent &other)
 (Required) copy constructor. More...
 
DDModEventoperator= (const DDModEvent &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::DisplayDataEvent
 DisplayDataEvent ()
 (Required) default constructor. More...
 
 DisplayDataEvent (const DisplayDataEvent &other)
 (Required) copy constructor. More...
 
DisplayDataEventoperator= (const DisplayDataEvent &other)
 (Required) copy assignment. More...
 

Private Attributes

const casacore::RecorditsRec
 the data record More...
 

Detailed Description

Class used by DisplayDatas to signal change in data.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"DisplayData Modified Event" describes "Events" (ie. things which happen at a measurable time) which signal to event handlers that the data of the transmitting displaydata has been modified.

Prerequisite

Synopsis

This class adds to the information stored in the DisplayDataEvent class. It adds a pointer to a record that holds the modified data. The structure of the record is specific to each type of Display casacore::Data so the event handlers will need to know the structure they are listening for

Example

// Sending a DDModEvent from a Profile2dDD (inherits from ActiveCaching2dDD)
fillRecordWithData(rec); // DD specific function
DDModEvent ev(this, &rec);
ActiveCaching2dDD::handleEvent(ev); // let super classes send events
// Receiving a DDModEvent from a Profile2dDD
..\.
profile2dDD->addDisplayEventHandler(this);
..\.
void MyClass::handleEvent(DisplayEvent &ev) {
DDModEvent *dev = dynamic_cast<DDModEvent*>(&ev);
if (dev) {
Profile2dDD *pdd = dynamic_cast<Profile2dDD*>(dev->displayData());
if (pdd) {
// event from Profile2dDD received!
}
}
}

Motivation

It's desirable to send some data with DisplayDataEvents that has information about the DisplayData and the data that is modified within it.

Thrown Exceptions

.

Definition at line 101 of file DDModEvent.h.

Constructor & Destructor Documentation

casa::DDModEvent::DDModEvent ( DisplayData dd,
const casacore::Record rec 
)

Constructor, taking a pointer to a DisplayData and a pointer to a data record.

virtual casa::DDModEvent::~DDModEvent ( )
virtual

Destructor.

casa::DDModEvent::DDModEvent ( )
protected

(Required) default constructor.

casa::DDModEvent::DDModEvent ( const DDModEvent other)
protected

(Required) copy constructor.

Member Function Documentation

virtual const casacore::Record* casa::DDModEvent::dataRecord ( ) const
inlinevirtual

Return a pointer to the data record.

Definition at line 113 of file DDModEvent.h.

References itsRec.

DDModEvent& casa::DDModEvent::operator= ( const DDModEvent other)
protected

(Required) copy assignment.

Member Data Documentation

const casacore::Record* casa::DDModEvent::itsRec
private

the data record

Definition at line 131 of file DDModEvent.h.

Referenced by dataRecord().


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