Observable Class Referenceabstract

`#include <observable.h>`

Inheritance diagram for Observable:
Collaboration diagram for Observable:

## Public Member Functions

virtual | ~Observable ()
virtual void | attach (Observer *observer)
virtual void | detach (Observer *observer)
virtual void | notify ()
virtual std::string | get_name () const =0
virtual std::string | get_value () const =0

## Protected Member Functions

| Observable ()

## Private Attributes

std::list< Observer * > | observers

## Detailed Description

Definition at line 37 of file observable.h.

## Constructor & Destructor Documentation

Observable::~Observable | ( |  | ) |

virtual

Definition at line 29 of file observable.cpp.

Observable::Observable | ( |  | ) |

protected

Definition at line 54 of file observable.cpp.

## Member Function Documentation

void Observable::attach | ( | Observer * | observer | ) |

virtual

Definition at line 34 of file observable.cpp.

References observers.

Referenced by Dispatcher< ARPAPredictor >::map().

Here is the caller graph for this function:

void Observable::detach | ( | Observer * | observer | ) |

virtual

Definition at line 39 of file observable.cpp.

References observers.

virtual std::string Observable::get_name | ( |  | ) | const

pure virtual

Implemented in Variable.

Referenced by Dispatcher< ARPAPredictor >::dispatch(), Dispatcher< ARPAPredictor >::map(), DictionaryPredictor::update(), PredictorRegistry::update(), DejavuPredictor::update(), AbbreviationExpansionPredictor::update(), SmoothedNgramPredictor::update(), RecencyPredictor::update(), Selector::update(), ARPAPredictor::update(), PredictorActivator::update(), and ContextTracker::update().

Here is the caller graph for this function:

virtual std::string Observable::get_value | ( |  | ) | const

pure virtual

Implemented in Variable.

Referenced by Dispatcher< ARPAPredictor >::dispatch(), DictionaryPredictor::update(), PredictorRegistry::update(), DejavuPredictor::update(), AbbreviationExpansionPredictor::update(), SmoothedNgramPredictor::update(), RecencyPredictor::update(), ARPAPredictor::update(), PredictorActivator::update(), and ContextTracker::update().

Here is the caller graph for this function:

void Observable::notify | ( |  | ) |

virtual

Definition at line 44 of file observable.cpp.

References observers.

Referenced by Variable::set_value().

Here is the caller graph for this function:

## Member Data Documentation

std::list<Observer*> Observable::observers

private

Definition at line 52 of file observable.h.

Referenced by attach(), detach(), and notify().

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

- /build/buildd/presage-0.8.8/src/lib/core/observable.h
- /build/buildd/presage-0.8.8/src/lib/core/observable.cpp