GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

gdcmSimpleSubjectWatcher.h
Go to the documentation of this file.
1 /*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13 =========================================================================*/
14 #ifndef GDCMSIMPLESUBJECTWATCHER_H
15 #define GDCMSIMPLESUBJECTWATCHER_H
16
17 #include "gdcmSubject.h"
18 #include "gdcmCommand.h"
19 #include "gdcmSmartPointer.h"
20 #include "gdcmAnonymizeEvent.h"
21 #include "gdcmDataEvent.h"
22
23 namespace gdcm
24 {
25 //-----------------------------------------------------------------------------
26 class Event;
31 class GDCM_EXPORT SimpleSubjectWatcher
32 {
33 public:
34 SimpleSubjectWatcher(Subject * s, const char *comment = "");
35 virtual ~SimpleSubjectWatcher();
36
37 protected:
38 virtual void StartFilter();
39 virtual void EndFilter();
40 virtual void ShowProgress(Subject *caller, const Event &evt);
41 virtual void ShowIteration();
42 virtual void ShowAnonymization(Subject *caller, const Event &evt);
43 virtual void ShowDataSet(Subject *caller, const Event &evt);
44 virtual void ShowData(Subject *caller, const Event &evt);
45 virtual void ShowAbort();
46
47 protected:
48 // Custom API used for internal Testing do not use !
49 void TestAbortOn();
50 void TestAbortOff();
51
52 private:
53 SmartPointer<gdcm::Subject> m_Subject;
54 std::string m_Comment;
55
56 typedef SimpleMemberCommand<SimpleSubjectWatcher> SimpleCommandType;
57 typedef MemberCommand<SimpleSubjectWatcher> CommandType;
58
59 SmartPointer<SimpleCommandType> m_StartFilterCommand;
60 SmartPointer<SimpleCommandType> m_EndFilterCommand;
61 SmartPointer<CommandType> m_ProgressFilterCommand;
62 SmartPointer<SimpleCommandType> m_IterationFilterCommand;
63 SmartPointer<SimpleCommandType> m_AbortFilterCommand;
64 SmartPointer<CommandType> m_AnonymizeFilterCommand;
65 SmartPointer<CommandType> m_DataFilterCommand;
66 SmartPointer<CommandType> m_DataSetFilterCommand;
67
68 unsigned long m_StartTag;
69 unsigned long m_EndTag;
70 unsigned long m_ProgressTag;
71 unsigned long m_IterationTag;
72 unsigned long m_AbortTag;
73 unsigned long m_AnonymizeTag;
74 unsigned long m_DataTag;
75 unsigned long m_DataSetTag;
76
77 bool m_TestAbort;
78
79 SimpleSubjectWatcher(const SimpleSubjectWatcher&); // Not implemented.
80 void operator=(const SimpleSubjectWatcher&); // Not implemented.
81 };
82 } // end namespace gdcm
83 //-----------------------------------------------------------------------------
84 #endif //GDCMSIMPLESUBJECTWATCHER_H