GDCM 3.2.1

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 SimpleSubjectWatcher(const SimpleSubjectWatcher&) = delete;
37 void operator=(const SimpleSubjectWatcher&) = delete;
38
39 protected:
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
50 protected:
51 // Custom API used for internal Testing do not use !
52 void TestAbortOn();
53 void TestAbortOff();
54
55 private:
56 SmartPointer<Subject> m_Subject;
57 std::string m_Comment;
58
59 typedef SimpleMemberCommand<SimpleSubjectWatcher> SimpleCommandType;
60 typedef MemberCommand<SimpleSubjectWatcher> CommandType;
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
gdcm::Event
superclass for callback/observer methods
Definition gdcmEvent.h:27
gdcm::MemberCommand
Command subclass that calls a pointer to a member function.
Definition gdcmCommand.h:56
gdcm::SimpleMemberCommand
Command subclass that calls a pointer to a member function.
Definition gdcmCommand.h:131
gdcm::SimpleSubjectWatcher::SimpleSubjectWatcher
SimpleSubjectWatcher(Subject *s, const char *comment="")
gdcm::SimpleSubjectWatcher::ShowAbort
virtual void ShowAbort()
gdcm::SimpleSubjectWatcher::StartFilter
virtual void StartFilter()
gdcm::SimpleSubjectWatcher::ShowFileName
virtual void ShowFileName(Subject *caller, const Event &evt)
gdcm::SimpleSubjectWatcher::TestAbortOn
void TestAbortOn()
gdcm::SimpleSubjectWatcher::EndFilter
virtual void EndFilter()
gdcm::SimpleSubjectWatcher::ShowDataSet
virtual void ShowDataSet(Subject *caller, const Event &evt)
gdcm::SimpleSubjectWatcher::TestAbortOff
void TestAbortOff()
gdcm::SimpleSubjectWatcher::operator=
void operator=(const SimpleSubjectWatcher &)=delete
gdcm::SimpleSubjectWatcher::SimpleSubjectWatcher
SimpleSubjectWatcher(const SimpleSubjectWatcher &)=delete
gdcm::SimpleSubjectWatcher::ShowData
virtual void ShowData(Subject *caller, const Event &evt)
gdcm::SimpleSubjectWatcher::~SimpleSubjectWatcher
virtual ~SimpleSubjectWatcher()
gdcm::SimpleSubjectWatcher::ShowIteration
virtual void ShowIteration()
gdcm::SimpleSubjectWatcher::ShowProgress
virtual void ShowProgress(Subject *caller, const Event &evt)
gdcm::SimpleSubjectWatcher::ShowAnonymization
virtual void ShowAnonymization(Subject *caller, const Event &evt)
gdcm::SmartPointer
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
gdcm::Subject
Subject.
Definition gdcmSubject.h:29
gdcmAnonymizeEvent.h
gdcmCommand.h
gdcmDataEvent.h
gdcmSmartPointer.h
gdcmSubject.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21