00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __freSetupOptimizationEvent_h
00019 #define __freSetupOptimizationEvent_h
00020
00021 #include "freElementals.h"
00022
00023 #include "itkEventObject.h"
00024
00025 namespace FREE
00026 {
00027
00028 #define freProgressEventMacro( classname , super ) \
00029 \
00030 class classname : public super { \
00031 public: \
00032 typedef classname Self; \
00033 typedef super Superclass; \
00034 classname(long lStatusID = 0, const std::string& sComment = "") \
00035 { \
00036 m_StatusID = lStatusID; \
00037 m_Comment = sComment; \
00038 } \
00039 virtual ~classname() {} \
00040 long GetStatusID () const {return m_StatusID;}; \
00041 const std::string & GetComment () const {return m_Comment;}; \
00042 virtual const char * GetEventName() const { return #classname; } \
00043 virtual bool CheckEvent(const ::itk::EventObject* e) const \
00044 { return dynamic_cast<const Self*>(e); } \
00045 virtual ::itk::EventObject* MakeObject() const \
00046 { return new Self; } \
00047 classname(const Self&s) :super(s) \
00048 { m_Comment = s.GetComment(); \
00049 m_StatusID = s.GetStatusID(); }; \
00050 private: \
00051 long m_StatusID;\
00052 std::string m_Comment;\
00053 void operator=(const Self&); \
00054 }
00055
00056
00067 freProgressEventMacro(EvaluationProgressObserverEvent,itk::ProgressEvent);
00068
00076 freProgressEventMacro(EvaluationDoneObserverEvent,itk::ProgressEvent);
00085 freProgressEventMacro(NextAdaptationObserverEvent,itk::ProgressEvent);
00086
00087 }
00088
00089 #endif
00090
00091
00092