Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sf::ui::ComponentObservable Class Reference

The class who call the observers

. More...

#include <ComponentObservable.hpp>

Inheritance diagram for sf::ui::ComponentObservable:
sf::ui::Component sf::ui::Focusable sf::ui::Label sf::ui::AbstractButton sf::ui::KeyField sf::ui::TextField sf::ui::Button sf::ui::CheckBox sf::ui::FormattedTextField sf::ui::PasswordField

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
 

Detailed Description

The class who call the observers

.

Definition at line 31 of file ComponentObservable.hpp.

Constructor & Destructor Documentation

sf::ui::ComponentObservable::ComponentObservable ( )

The default constructor.

Member Function Documentation

void sf::ui::ComponentObservable::addObserver ( sf::ui::ComponentObserver observer)

Add an observer.

int sf::ui::ComponentObservable::countObservers ( )
Returns
the number of observers
std::set<sf::ui::ComponentObserver*>::const_iterator sf::ui::ComponentObservable::getObserversBegin ( ) const
Returns
the begin of the observers' iterator
std::set<sf::ui::ComponentObserver*>::const_iterator sf::ui::ComponentObservable::getObserversEnd ( ) const
Returns
the end of the observers' iterator
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.

Parameters
observerthe observer to remove
void sf::ui::ComponentObservable::triggerEvent ( const sf::ui::ComponentEvent event)
protected

Triggers the event and notify all observers.

Parameters
event- the event to push

The documentation for this class was generated from the following file: