|
SVCS - English Documentation
|
Classes | |
| struct | RecordedNotification |
Public Member Functions | |
| void | attach (std::shared_ptr< svcs::services::IObserver > observer) override |
| void | detach (std::shared_ptr< svcs::services::IObserver > observer) override |
| void | notify (const svcs::services::Event &event) const override |
| Notifies all attached observers about an event. | |
| void | clearNotifications () |
| size_t | getNotificationCount () const |
| const std::vector< RecordedNotification > & | getNotifications () const |
| bool | hasNotification (svcs::services::Event::Type type) const |
| Public Member Functions inherited from svcs::services::ISubject | |
| virtual | ~ISubject ()=default |
| Virtual destructor. | |
| virtual void | attach (std::shared_ptr< IObserver > observer)=0 |
| Attaches an observer to the subject. | |
| virtual void | detach (std::shared_ptr< IObserver > observer)=0 |
| Detaches an observer from the subject. | |
Additional Inherited Members | |
| Protected Attributes inherited from svcs::services::ISubject | |
| std::vector< IObserver * > | observers |
| Collection of registered observers. | |
|
inlineoverridevirtual |
Notifies all attached observers about an event.
This method is made public so that component classes (like ObjectStorage) can publish events through the injected ISubject pointer. The method is declared as const because event notification is a logically non-mutating action on the Subject's state.
| event | The constant reference to the event structure to be sent. |
Implements svcs::services::ISubject.