wxTst::CRCapturedEvent Class Reference

Abstract parent class for all events to capture of interest. More...

#include <CRCapturedEvent.h>

Inheritance diagram for wxTst::CRCapturedEvent:

Inheritance graph
[legend]
Collaboration diagram for wxTst::CRCapturedEvent:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CRCapturedEvent (wxEvent *event)
 Constructor.
virtual void EmitCpp ()=0
 Emit event simulation specific C++ code using CRCppEmitter.
virtual wxEvent * GetEvent ()
 Get real wxEvent.
virtual bool IsIrrelevant () const
 Return true for irrelevant events which should not be emitted.
virtual bool IsPending () const
 Return true, if this event might be part of a series of events.
virtual void Process (CRCapturedEvent **pendingEvt)=0
 Process event, only called after checking for handling ability.
virtual ~CRCapturedEvent ()
 Destructor.

Protected Attributes

wxEvent * m_event


Detailed Description

Abstract parent class for all events to capture of interest.

Implemented using Strategy pattern.

Definition at line 28 of file CRCapturedEvent.h.


Constructor & Destructor Documentation

wxTst::CRCapturedEvent::CRCapturedEvent ( wxEvent *  event  ) 

Constructor.

Parameters:
event event to handle

Definition at line 20 of file CRCapturedEvent.cpp.

wxTst::CRCapturedEvent::~CRCapturedEvent (  )  [virtual]

Destructor.

Definition at line 27 of file CRCapturedEvent.cpp.


Member Function Documentation

void wxTst::CRCapturedEvent::EmitCpp (  )  [pure virtual]

wxEvent * wxTst::CRCapturedEvent::GetEvent (  )  [virtual]

bool wxTst::CRCapturedEvent::IsIrrelevant (  )  const [virtual]

Return true for irrelevant events which should not be emitted.

E.g. text updates of double typed spin controls.

Returns:
true, if this event is irrelevant

Reimplemented in wxTst::CRTextUpdateEvent.

Definition at line 45 of file CRCapturedEvent.cpp.

Referenced by wxTst::CREventCaptureManager::FilterEvent().

bool wxTst::CRCapturedEvent::IsPending (  )  const [virtual]

Return true, if this event might be part of a series of events.

E.g. Entering text in text controls creates wxEVT_COMMAND_TEXT_UPDATED events for every key stroke. Thus, they should be assembled into one.

Process() method is called before, allowing investigating the context.

Returns:
true, if this event is not stand-alone

Reimplemented in wxTst::CRNotebookPageChangeEvent, wxTst::CRSliderUpdateEvent, and wxTst::CRTextUpdateEvent.

Definition at line 39 of file CRCapturedEvent.cpp.

Referenced by wxTst::CREventCaptureManager::FilterEvent().

void wxTst::CRCapturedEvent::Process ( CRCapturedEvent **  pendingEvt  )  [pure virtual]

Process event, only called after checking for handling ability.

By handing over the current pending event assembling a series of events before actual code emitting is allowed, cf. IsPending() method.

The pending event will be emitted and subsequently destroyed right after returning control from this method. Thus, if a pending event should not be emitted, because it is assembled in this new event it must be deleted within this method.

Parameters:
pendingEvt current pending event with respect to code emitting (or NULL if none is pending)

Implemented in wxTst::CRButtonClickEvent, wxTst::CRCheckBoxClickEvent, wxTst::CRChoiceSelectionEvent, wxTst::CRMenuSelectionEvent, wxTst::CRNotebookPageChangeEvent, wxTst::CRRadioBoxSelectionEvent, wxTst::CRSliderUpdateEvent, wxTst::CRSpinCtrlUpdateEvent, wxTst::CRTextUpdateEvent, wxTst::CRTreeItemRightClickEvent, and wxTst::CRTreeSelectionChangingEvent.

Referenced by wxTst::CREventCaptureManager::FilterEvent().


Member Data Documentation

wxEvent* wxTst::CRCapturedEvent::m_event [protected]


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

wxWidgets Logo Get wxGuiTesting at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated on Tue Mar 17 17:29:30 2009 for wxGuiTesting by doxygen 1.5.5