METSlib 0.6

- Main Page
- Modules
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
mets::observer< observed_subject > Class Template Referenceabstract

Template base class for the observers of some observed_subject. More...

`#include <observer.hh>`

Collaboration diagram for mets::observer< observed_subject >:

## Public Member Functions
virtual void | update (observed_subject *)=0
| This method is automatically called when this observer is attached to a "notified" subject. More...

## Detailed Description

### template<typename observed_subject>
class mets::observer< observed_subject >

Template base class for the observers of some observed_subject.

You should declare a new observer type of some my_subject this way:

class my_observer : public observer<my_subject>

Every time notify() is called on the subject every attached observer is updated.

## Member Function Documentation

template<typename observed_subject>

virtual void mets::observer< observed_subject >::update | ( | observed_subject * |  | ) |
| pure virtual

This method is automatically called when this observer is attached to a "notified" subject.

Parameters

  subject,: | The subject that was notified and that called our update method.

Implemented in mets::improvement_logger< neighborhood_t >, mets::iteration_logger< neighborhood_t >, mets::search_listener< move_manager_type >, and mets::search_listener< neighborhood_t >.

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

- metslib/observer.hh

Return to METSlib home page