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::~Observable | ( |  | ) |

virtual

Definition at line 29 of file observable.cpp.

## Observable()

Observable::Observable | ( |  | ) |

protected

Definition at line 54 of file observable.cpp.

## Member Function Documentation

## attach()

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

virtual

Definition at line 34 of file observable.cpp.

References observers.

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

Here is the caller graph for this function:

## detach()

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

virtual

Definition at line 39 of file observable.cpp.

References observers.

## get_name()

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

pure virtual

Implemented in Variable.

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

Here is the caller graph for this function:

## get_value()

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

pure virtual

Implemented in Variable.

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

Here is the caller graph for this function:

## notify()

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

## observers

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/presage-XwIsB9/presage-0.9.1/src/lib/core/observable.h
- /build/presage-XwIsB9/presage-0.9.1/src/lib/core/observable.cpp