GDCM 3.0.24
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
23namespace gdcm
24{
25//-----------------------------------------------------------------------------
26class Event;
32{
33public:
34 SimpleSubjectWatcher(Subject * s, const char *comment = "");
37 void operator=(const SimpleSubjectWatcher&) = delete;
38
39protected:
40 virtual void StartFilter();
41 virtual void EndFilter();
42 virtual void ShowProgress(Subject *caller, const Event &evt);
43 virtual void ShowFileName(Subject *caller, const Event &evt);
44 virtual void ShowIteration();
45 virtual void ShowAnonymization(Subject *caller, const Event &evt);
46 virtual void ShowDataSet(Subject *caller, const Event &evt);
47 virtual void ShowData(Subject *caller, const Event &evt);
48 virtual void ShowAbort();
49
50protected:
51 // Custom API used for internal Testing do not use !
54
55private:
56 SmartPointer<Subject> m_Subject;
57 std::string m_Comment;
58
61
62 SmartPointer<SimpleCommandType> m_StartFilterCommand;
63 SmartPointer<SimpleCommandType> m_EndFilterCommand;
64 SmartPointer<CommandType> m_ProgressFilterCommand;
65 SmartPointer<CommandType> m_FileNameFilterCommand;
66 SmartPointer<SimpleCommandType> m_IterationFilterCommand;
67 SmartPointer<SimpleCommandType> m_AbortFilterCommand;
68 SmartPointer<CommandType> m_AnonymizeFilterCommand;
69 SmartPointer<CommandType> m_DataFilterCommand;
70 SmartPointer<CommandType> m_DataSetFilterCommand;
71
72 unsigned long m_StartTag;
73 unsigned long m_EndTag;
74 unsigned long m_ProgressTag;
75 unsigned long m_FileNameTag;
76 unsigned long m_IterationTag;
77 unsigned long m_AbortTag;
78 unsigned long m_AnonymizeTag;
79 unsigned long m_DataTag;
80 unsigned long m_DataSetTag;
81
82 bool m_TestAbort;
83
84};
85} // end namespace gdcm
86//-----------------------------------------------------------------------------
87#endif //GDCMSIMPLESUBJECTWATCHER_H
superclass for callback/observer methods
Definition gdcmEvent.h:27
Command subclass that calls a pointer to a member function.
Definition gdcmCommand.h:56
Command subclass that calls a pointer to a member function.
Definition gdcmCommand.h:131
SimpleSubjectWatcher.
Definition gdcmSimpleSubjectWatcher.h:32
SimpleSubjectWatcher(Subject *s, const char *comment="")
virtual void StartFilter()
virtual void ShowFileName(Subject *caller, const Event &evt)
virtual void ShowDataSet(Subject *caller, const Event &evt)
void operator=(const SimpleSubjectWatcher &)=delete
SimpleSubjectWatcher(const SimpleSubjectWatcher &)=delete
virtual void ShowData(Subject *caller, const Event &evt)
virtual void ShowIteration()
virtual void ShowProgress(Subject *caller, const Event &evt)
virtual void ShowAnonymization(Subject *caller, const Event &evt)
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
Subject.
Definition gdcmSubject.h:29
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21