The class who call the observers
. More...
#include <ComponentObservable.hpp>
Public Member Functions | |
ComponentObservable () | |
The default constructor. More... | |
void | addObserver (sf::ui::ComponentObserver *observer) |
Add an observer. More... | |
std::set < sf::ui::ComponentObserver * > ::const_iterator | getObserversBegin () const |
std::set < sf::ui::ComponentObserver * > ::const_iterator | getObserversEnd () const |
int | countObservers () |
void | removeObserver (sf::ui::ComponentObserver *observer) |
Remove the observer at the given index. More... | |
void | removeAllObservers () |
Remove all the observers. More... | |
Protected Member Functions | |
void | triggerEvent (const sf::ui::ComponentEvent &event) |
Triggers the event and notify all observers. More... | |
Protected Attributes | |
std::set < sf::ui::ComponentObserver * > | m_observers |
sf::ui::ComponentObservable::ComponentObservable | ( | ) |
The default constructor.
void sf::ui::ComponentObservable::addObserver | ( | sf::ui::ComponentObserver * | observer | ) |
Add an observer.
int sf::ui::ComponentObservable::countObservers | ( | ) |
std::set<sf::ui::ComponentObserver*>::const_iterator sf::ui::ComponentObservable::getObserversBegin | ( | ) | const |
std::set<sf::ui::ComponentObserver*>::const_iterator sf::ui::ComponentObservable::getObserversEnd | ( | ) | const |
void sf::ui::ComponentObservable::removeAllObservers | ( | ) |
Remove all the observers.
void sf::ui::ComponentObservable::removeObserver | ( | sf::ui::ComponentObserver * | observer | ) |
Remove the observer at the given index.
observer | the observer to remove |
|
protected |
Triggers the event and notify all observers.
event | - the event to push |