#include <TdkSubject.h>
Inheritance diagram for TdkSubject:

Constructor and Destructor Methods | ||||
| Methods related to instantiation and destruction. | ||||
| TdkSubject () | ||||
| protected Empty constructor. | ||||
| virtual | ~TdkSubject () | |||
| Virtual destructor. | ||||
Public Member Functions | ||||
Behavioral Methods | ||||
Adds the observer to observer set. Then the observer can receive this subject 'signals'. Methods related to subject behavior.
| ||||
| virtual void | attach (TdkObserver *obs) | |||
| virtual void | detach (TdkObserver *obs) | |||
| Removes the observer from observer set. | ||||
| virtual void | notify () | |||
| Sends a sinalyze any change occurred to all observers in observer set. | ||||
| int | getAction () | |||
| Retrieves the action occurred. | ||||
| void | setAction (const int &act) | |||
| Defines the action occurred. | ||||
Private Attributes | ||||
| list< TdkObserver * > | _observers | |||
| List of associated observers. | ||||
| int | _action | |||
| Sinalize the change occurred. | ||||
The TdkSubject is part of implementation of observer design pattern.
TODO: 1)
| TdkSubject::TdkSubject | ( | ) | [inline, protected] |
protected Empty constructor.
| TdkSubject::~TdkSubject | ( | ) | [inline, virtual] |
Virtual destructor.
| void TdkSubject::attach | ( | TdkObserver * | obs | ) | [inline, virtual] |
| void TdkSubject::detach | ( | TdkObserver * | obs | ) | [inline, virtual] |
Removes the observer from observer set.
| obs | The observer element to remove from observer set. (Input) |
| void TdkSubject::notify | ( | ) | [inline, virtual] |
Sends a sinalyze any change occurred to all observers in observer set.
| int TdkSubject::getAction | ( | ) | [inline] |
Retrieves the action occurred.
| void TdkSubject::setAction | ( | const int & | act | ) | [inline] |
Defines the action occurred.
list<TdkObserver*> TdkSubject::_observers [private] |
List of associated observers.
int TdkSubject::_action [private] |
Sinalize the change occurred.
1.5.2