presage  0.9.2~beta
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Observable Class Referenceabstract

#include <observable.h>

Inheritance diagram for Observable:
Inheritance graph
Collaboration diagram for Observable:
Collaboration graph

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< ARPAPredictor >::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

◆ get_value()

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

◆ 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: