GDCM 3.0.24
gdcmSubject.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 GDCMSUBJECT_H
15#define GDCMSUBJECT_H
16
17#include "gdcmObject.h"
18
19namespace gdcm
20{
21class Event;
22class Command;
23class SubjectInternals;
29{
30public:
32 ~Subject() override;
33
42 unsigned long AddObserver(const Event & event, Command *);
43 unsigned long AddObserver(const Event & event, Command *) const;
44
50 Command* GetCommand(unsigned long tag);
51
53 void InvokeEvent( const Event & );
54
57 void InvokeEvent( const Event & ) const;
58
60 void RemoveObserver(unsigned long tag);
61
64
66 bool HasObserver( const Event & event ) const;
67
68protected:
69
70private:
71 SubjectInternals *Internals;
72private:
73};
74
75} // end namespace gdcm
76
77#endif //GDCMSUBJECT_H
Command superclass for callback/observer methods.
Definition gdcmCommand.h:28
superclass for callback/observer methods
Definition gdcmEvent.h:27
Object.
Definition gdcmObject.h:37
Subject.
Definition gdcmSubject.h:29
void RemoveObserver(unsigned long tag)
void InvokeEvent(const Event &)
Command * GetCommand(unsigned long tag)
void InvokeEvent(const Event &) const
void RemoveAllObservers()
unsigned long AddObserver(const Event &event, Command *) const
unsigned long AddObserver(const Event &event, Command *)
~Subject() override
bool HasObserver(const Event &event) const
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21