GDCM
2.0.18
|
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 GDCMSUBJECT_H 00015 #define GDCMSUBJECT_H 00016 00017 #include "gdcmObject.h" 00018 00019 namespace gdcm 00020 { 00021 class Event; 00022 class Command; 00023 class SubjectInternals; 00028 class GDCM_EXPORT Subject : public Object 00029 { 00030 public: 00031 Subject(); 00032 ~Subject(); 00033 00042 unsigned long AddObserver(const Event & event, Command *); 00043 unsigned long AddObserver(const Event & event, Command *) const; 00044 00050 Command* GetCommand(unsigned long tag); 00051 00053 void InvokeEvent( const Event & ); 00054 00057 void InvokeEvent( const Event & ) const; 00058 00060 void RemoveObserver(unsigned long tag); 00061 00063 void RemoveAllObservers(); 00064 00066 bool HasObserver( const Event & event ) const; 00067 00068 protected: 00069 00070 private: 00071 SubjectInternals *Internals; 00072 private: 00073 }; 00074 00075 } // end namespace gdcm 00076 00077 #endif //GDCMSUBJECT_H