GDCM 2.2.0

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

- File List
- File Members

gdcmSimpleSubjectWatcher.h
Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004
    00005   Copyright (c) 2006-2011 Mathieu Malaterre
    00006   All rights reserved.
    00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00008
    00009      This software is distributed WITHOUT ANY WARRANTY; without even
    00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00011      PURPOSE.  See the above copyright notice for more information.
    00012
    00013 =========================================================================*/
    00014 #ifndef GDCMSIMPLESUBJECTWATCHER_H
    00015 #define GDCMSIMPLESUBJECTWATCHER_H
    00016
    00017 #include "gdcmSubject.h"
    00018 #include "gdcmCommand.h"
    00019 #include "gdcmSmartPointer.h"
    00020 #include "gdcmAnonymizeEvent.h"
    00021 #include "gdcmDataEvent.h"
    00022
    00023 namespace gdcm
    00024 {
    00025 //-----------------------------------------------------------------------------
    00026 class Event;
    00031 class GDCM_EXPORT SimpleSubjectWatcher
    00032 {
    00033 public:
    00034   SimpleSubjectWatcher(Subject * s, const char *comment = "");
    00035   virtual ~SimpleSubjectWatcher();
    00036
    00037 protected:
    00038   virtual void StartFilter();
    00039   virtual void EndFilter();
    00040   virtual void ShowProgress(Subject *caller, const Event &evt);
    00041   virtual void ShowIteration();
    00042   virtual void ShowAnonymization(Subject *caller, const Event &evt);
    00043   virtual void ShowDataSet(Subject *caller, const Event &evt);
    00044   virtual void ShowData(Subject *caller, const Event &evt);
    00045   virtual void ShowAbort();
    00046
    00047 protected:
    00048   // Custom API used for internal Testing do not use !
    00049   void TestAbortOn();
    00050   void TestAbortOff();
    00051
    00052 private:
    00053   SmartPointer<gdcm::Subject> m_Subject;
    00054   std::string m_Comment;
    00055
    00056   typedef SimpleMemberCommand<SimpleSubjectWatcher> SimpleCommandType;
    00057   typedef MemberCommand<SimpleSubjectWatcher> CommandType;
    00058
    00059   SmartPointer<SimpleCommandType> m_StartFilterCommand;
    00060   SmartPointer<SimpleCommandType> m_EndFilterCommand;
    00061   SmartPointer<CommandType> m_ProgressFilterCommand;
    00062   SmartPointer<SimpleCommandType> m_IterationFilterCommand;
    00063   SmartPointer<SimpleCommandType> m_AbortFilterCommand;
    00064   SmartPointer<CommandType> m_AnonymizeFilterCommand;
    00065   SmartPointer<CommandType> m_DataFilterCommand;
    00066   SmartPointer<CommandType> m_DataSetFilterCommand;
    00067
    00068   unsigned long m_StartTag;
    00069   unsigned long m_EndTag;
    00070   unsigned long m_ProgressTag;
    00071   unsigned long m_IterationTag;
    00072   unsigned long m_AbortTag;
    00073   unsigned long m_AnonymizeTag;
    00074   unsigned long m_DataTag;
    00075   unsigned long m_DataSetTag;
    00076
    00077   bool m_TestAbort;
    00078
    00079   SimpleSubjectWatcher(const SimpleSubjectWatcher&);  // Not implemented.
    00080   void operator=(const SimpleSubjectWatcher&);  // Not implemented.
    00081 };
    00082 } // end namespace gdcm
    00083 //-----------------------------------------------------------------------------
    00084 #endif //GDCMSIMPLESUBJECTWATCHER_H