GDCM  2.2.6
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 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:
54  std::string m_Comment;
55 
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
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

Generated on Sat Dec 21 2013 05:56:17 for GDCM by doxygen 1.8.5
SourceForge.net Logo