gdcmSubject.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program: GDCM (Grassroots DICOM). A DICOM library
00004   Module:  $URL$
00005 
00006   Copyright (c) 2006-2009 Mathieu Malaterre
00007   All rights reserved.
00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 #ifndef __gdcmSubject_h
00016 #define __gdcmSubject_h
00017 
00018 #include "gdcmObject.h"
00019 
00020 namespace gdcm
00021 {
00022 class Event;
00023 class Command;
00024 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
00078 

Generated on Sun Mar 7 03:17:21 2010 for GDCM by doxygen 1.6.3
SourceForge.net Logo