GDCM  2.4.5
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;
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 ShowFileName(Subject *caller, const Event &evt);
42  virtual void ShowIteration();
43  virtual void ShowAnonymization(Subject *caller, const Event &evt);
44  virtual void ShowDataSet(Subject *caller, const Event &evt);
45  virtual void ShowData(Subject *caller, const Event &evt);
46  virtual void ShowAbort();
47 
48 protected:
49  // Custom API used for internal Testing do not use !
50  void TestAbortOn();
51  void TestAbortOff();
52 
53 private:
54  SmartPointer<Subject> m_Subject;
55  std::string m_Comment;
56 
59 
60  SmartPointer<SimpleCommandType> m_StartFilterCommand;
61  SmartPointer<SimpleCommandType> m_EndFilterCommand;
62  SmartPointer<CommandType> m_ProgressFilterCommand;
63  SmartPointer<CommandType> m_FileNameFilterCommand;
64  SmartPointer<SimpleCommandType> m_IterationFilterCommand;
65  SmartPointer<SimpleCommandType> m_AbortFilterCommand;
66  SmartPointer<CommandType> m_AnonymizeFilterCommand;
67  SmartPointer<CommandType> m_DataFilterCommand;
68  SmartPointer<CommandType> m_DataSetFilterCommand;
69 
70  unsigned long m_StartTag;
71  unsigned long m_EndTag;
72  unsigned long m_ProgressTag;
73  unsigned long m_FileNameTag;
74  unsigned long m_IterationTag;
75  unsigned long m_AbortTag;
76  unsigned long m_AnonymizeTag;
77  unsigned long m_DataTag;
78  unsigned long m_DataSetTag;
79 
80  bool m_TestAbort;
81 
82  SimpleSubjectWatcher(const SimpleSubjectWatcher&); // Not implemented.
83  void operator=(const SimpleSubjectWatcher&); // Not implemented.
84 };
85 } // end namespace gdcm
86 //-----------------------------------------------------------------------------
87 #endif //GDCMSIMPLESUBJECTWATCHER_H
superclass for callback/observer methods
Definition: gdcmEvent.h:26
Command subclass that calls a pointer to a member function.
Definition: gdcmCommand.h:56
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
SimpleSubjectWatcher This is a typical Subject Watcher class. It will observe all events...
Definition: gdcmSimpleSubjectWatcher.h:31
Subject.
Definition: gdcmSubject.h:28
Class for Smart Pointer.
Definition: gdcmObject.h:26
Command subclass that calls a pointer to a member function.
Definition: gdcmCommand.h:131
Definition: gdcmASN1.h:20

Generated on Fri Sep 25 2015 17:58:24 for GDCM by doxygen 1.8.9.1
SourceForge.net Logo