1 #if !defined(__SUBJECT_HPP)
24 #if !defined(__COMMON_HPP)
28 #if !defined(__EVENT_HPP)
32 #if !defined(__ITERATOR_HPP)
33 #include <Iterator.hpp>
38 DECLARE_CLASS( Subject );
39 DECLARE_CLASS( Observer );
181 #endif // if !defined(__SUBJECT_HPP)
Subject(void)
Default constructor.
Definition: Subject.cpp:39
virtual Iterator< ObserverPtr > * createIterator(void)=0
Create a iterator for all observers.
Observer observes Subjets and supports the event interface for recieving subject event notifications...
Definition: Observer.hpp:44
virtual void destroyIterator(Iterator< ObserverPtr > *)=0
Deletes the iterator instance.
virtual ~Subject(void)
Virtual destructor.
Definition: Subject.cpp:57
SubjectRef operator=(SubjectCref)
Assignment operator.
Definition: Subject.cpp:66
bool operator==(SubjectCref) const
Equality operator.
Definition: Subject.cpp:75
Forward reference the various common classes.
Definition: AbstractAllocator.hpp:32
NullPointerException is the base exception type for NullPointer.
Definition: NullPointerException.hpp:40
Subject knows its Observer objects, communicates with its observers through event notification...
Definition: Subject.hpp:46
virtual void notifyAllObservers(Event< Identifier > *)
Performs the notification of ALL observers for a with a specific event.
Definition: Subject.cpp:121
virtual void addObserver(ObserverPtr, Event< Identifier > *)=0
Add an observer for a specific event.
bool operator!=(SubjectCref) const
In-Equality operator.
Definition: Subject.cpp:94
The Iterator provides a way to access the elements of an collection type sequentially without exposin...
Definition: Iterator.hpp:44
virtual void removeObserver(ObserverPtr)=0
Remove an observer from all event notifications.
virtual void notifyObservers(Event< Identifier > *)
Performs the notification of observers for a specific event.
Definition: Subject.cpp:101
Event provides a type basis for event ontologies.
Definition: Event.hpp:35