GDCM
2.0.18
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 #ifndef GDCMSIMPLESUBJECTWATCHER_H 00015 #define GDCMSIMPLESUBJECTWATCHER_H 00016 00017 #include "gdcmSubject.h" 00018 #include "gdcmCommand.h" 00019 #include "gdcmSmartPointer.h" 00020 #include "gdcmAnonymizeEvent.h" 00021 00022 namespace gdcm 00023 { 00024 //----------------------------------------------------------------------------- 00025 class Event; 00030 class GDCM_EXPORT SimpleSubjectWatcher 00031 { 00032 public: 00033 SimpleSubjectWatcher(Subject * s, const char *comment = ""); 00034 virtual ~SimpleSubjectWatcher(); 00035 00036 protected: 00037 virtual void StartFilter(); 00038 virtual void EndFilter(); 00039 virtual void ShowProgress(Subject *caller, const Event &evt); 00040 virtual void ShowIteration(); 00041 virtual void ShowAnonymization(Subject *caller, const Event &evt); 00042 virtual void ShowAbort(); 00043 00044 protected: 00045 // Custom API used for internal Testing do not use ! 00046 void TestAbortOn(); 00047 void TestAbortOff(); 00048 00049 private: 00050 SmartPointer<gdcm::Subject> m_Subject; 00051 std::string m_Comment; 00052 00053 typedef SimpleMemberCommand<SimpleSubjectWatcher> SimpleCommandType; 00054 typedef MemberCommand<SimpleSubjectWatcher> CommandType; 00055 00056 SmartPointer<SimpleCommandType> m_StartFilterCommand; 00057 SmartPointer<SimpleCommandType> m_EndFilterCommand; 00058 SmartPointer<CommandType> m_ProgressFilterCommand; 00059 SmartPointer<SimpleCommandType> m_IterationFilterCommand; 00060 SmartPointer<SimpleCommandType> m_AbortFilterCommand; 00061 SmartPointer<CommandType> m_AnonymizeFilterCommand; 00062 00063 unsigned long m_StartTag; 00064 unsigned long m_EndTag; 00065 unsigned long m_ProgressTag; 00066 unsigned long m_IterationTag; 00067 unsigned long m_AbortTag; 00068 unsigned long m_AnonymizeTag; 00069 00070 bool m_TestAbort; 00071 00072 SimpleSubjectWatcher(const SimpleSubjectWatcher&); // Not implemented. 00073 void operator=(const SimpleSubjectWatcher&); // Not implemented. 00074 }; 00075 } // end namespace gdcm 00076 //----------------------------------------------------------------------------- 00077 #endif //GDCMSIMPLESUBJECTWATCHER_H