sraaphorst / spelunker

Maze generation and solving library
Other
11 stars 2 forks source link

T105: Added Observable and Observer classes and signal / slot architecture. #106

Closed sraaphorst closed 6 years ago

sraaphorst commented 6 years ago

This introduces my signal / slots mechanism based on the Observer pattern. This is code from:

https://thehermeticvault.com/software-development/making-boost-signals2-more-oop-friendly

largely modified to make more sense to me with regards to the terminology.

Three new files are introduced here:

  1. Observable.h
  2. Observer.h
  3. MazeGeneratorSignalDescriptors.h, which is a placeholder (and example) for the signals that a MazeGenerator will emit, and UI elements will subscribe to hear.