15 #ifndef niftkAtomicStateTransitionTester_h
16 #define niftkAtomicStateTransitionTester_h
23 #include <QMetaObject>
25 #include <mitkCommon.h>
58 template <
class TestObject,
class TestObjectState>
73 itkGetConstMacro(TestObject, TestObject);
76 itkGetConstMacro(InitialState, typename TestObjectState::Pointer);
79 itkGetConstMacro(NextState, typename TestObjectState::Pointer);
82 itkGetConstMacro(ExpectedState, typename TestObjectState::Pointer);
85 itkSetMacro(ExpectedState, typename TestObjectState::Pointer);
102 void Connect(const QObject* qObject, const
char* signal = 0);
107 void Connect(const
char* signal);
112 return m_ItkSignalCollector->GetSignals();
119 return m_ItkSignalCollector->GetSignals(itkObject,
event);
125 return m_ItkSignalCollector->GetSignals(event);
131 return m_QtSignalCollector->GetSignals();
137 return m_QtSignalCollector->GetSignals(
object, signal);
144 return m_QtSignalCollector->GetSignals(signal);
168 virtual void PrintSelf(std::ostream & os, itk::Indent indent)
const;
183 TestObject m_TestObject;
186 typename TestObjectState::Pointer m_InitialState;
189 typename TestObjectState::Pointer m_NextState;
192 typename TestObjectState::Pointer m_ExpectedState;
195 ItkSignalCollector::Pointer m_ItkSignalCollector;
198 QtSignalCollector::Pointer m_QtSignalCollector;
Class for collecting ITK signals and sending notifications of them to registered listeners.
Definition: niftkItkSignalCollector.h:41
ItkSignals GetItkSignals(const itk::Object *itkObject, const itk::EventObject &event=itk::AnyEvent()) const
Returns a set of the collected ITK signals that are sent from the given object, and are of the given ...
Definition: niftkAtomicStateTransitionTester.h:117
virtual ~AtomicStateTransitionTester()
Destructs an AtomicStateTransitionTester object.
Definition: niftkAtomicStateTransitionTester.cxx:88
virtual void OnItkSignalReceived(const itk::Object *object, const itk::EventObject &event)
Handler for the ITK signals. Checks the consistency of the test object.
Definition: niftkAtomicStateTransitionTester.h:156
TestObject typedef ItkSignalCollector::Signal ItkSignal
Definition: niftkAtomicStateTransitionTester.h:66
Abstract class to be implemented by Qt signal listeners.
Definition: niftkQtSignalCollector.h:32
virtual void OnQtSignalReceived(const QObject *object, const char *signal)
Handler for the Qt signals. Checks the consistency of the test object.
Definition: niftkAtomicStateTransitionTester.h:162
Test class to ensure the atomic transition from one object state to another.
Definition: niftkAtomicStateTransitionTester.h:59
Definition: niftkITKAffineResampleImage.cxx:74
void Connect(itk::Object *itkObject, const itk::EventObject &event)
Connects this object to the specified events of itkObject. The consistency of the test object will be...
Definition: niftkAtomicStateTransitionTester.cxx:183
QtSignalCollector::Signal QtSignal
Definition: niftkAtomicStateTransitionTester.h:69
mitkClassMacroItkParent(AtomicStateTransitionTester, itk::Object) mitkNewMacro1Param(AtomicStateTransitionTester
const ItkSignals & GetItkSignals() const
Returns the collected ITK signals.
Definition: niftkAtomicStateTransitionTester.h:110
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Prints the collected signals to the given stream or to the standard output if no stream is given...
Definition: niftkAtomicStateTransitionTester.cxx:158
ItkSignals GetItkSignals(const itk::EventObject &event) const
Returns a set of the collected ITK signals that are of the given type or its subtype.
Definition: niftkAtomicStateTransitionTester.h:123
Class for collecting Qt signals and sending notifications of them to registered listeners.
Definition: niftkQtSignalCollector.h:67
Abstract class to be implemented by ITK signal listeners.
Definition: niftkItkSignalCollector.h:31
QtSignals GetQtSignals(const QObject *object, const char *signal=0)
Returns a set of the collected Qt signals that are of the given type.
Definition: niftkAtomicStateTransitionTester.h:135
AtomicStateTransitionTester(TestObject testObject)
Constructs an AtomicStateTransitionTester object.
Definition: niftkAtomicStateTransitionTester.cxx:41
QtSignals GetQtSignals(const char *signal)
Returns a set of the collected Qt signals that are sent from the given object, and are of the given t...
Definition: niftkAtomicStateTransitionTester.h:142
cl_event event
Definition: glew.h:3231
const QtSignals & GetQtSignals() const
Gets the Qt signals collected by this object.
Definition: niftkAtomicStateTransitionTester.h:129
ItkSignalCollector::Signals ItkSignals
Definition: niftkAtomicStateTransitionTester.h:67
virtual void Clear()
Clears the collected signals and resets the states.
Definition: niftkAtomicStateTransitionTester.cxx:97
QtSignalCollector::Signals QtSignals
Definition: niftkAtomicStateTransitionTester.h:70
Definition: niftkExceptionObject.h:21