Pacman Torben Petré
Loading...
Searching...
No Matches
logic::Subject Class Reference

#include <Observer.h>

Inheritance diagram for logic::Subject:

Public Member Functions

virtual ~Subject ()=default
void attach (const std::shared_ptr< Observer > &observer)
 Attaches an observer to this Subject.
void notify (Events event)
 Call the Observer update function with the provided event.

Protected Attributes

std::list< std::weak_ptr< Observer > > observers

Constructor & Destructor Documentation

◆ ~Subject()

virtual logic::Subject::~Subject ( )
virtualdefault

Member Function Documentation

◆ attach()

void Subject::attach ( const std::shared_ptr< Observer > & observer)

Attaches an observer to this Subject.

Parameters
observer

◆ notify()

void Subject::notify ( Events event)

Call the Observer update function with the provided event.

Parameters
eventWorld Event

Member Data Documentation

◆ observers

std::list<std::weak_ptr<Observer> > logic::Subject::observers
protected

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