Created
July 22, 2018 18:36
-
-
Save gayashanbc/307dab8b3a390b0191664bda82d0acf3 to your computer and use it in GitHub Desktop.
Header file of the Observer class (Observer Pattern in C++)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by shan on 4/7/17. | |
// | |
#ifndef OBSERVER_PATTERN_OBSERVER_HPP | |
#define OBSERVER_PATTERN_OBSERVER_HPP | |
/** | |
* Interface for the Observer | |
*/ | |
class Observer { | |
public: | |
/** | |
* Update the state of this observer | |
* @param temp new temperaure | |
* @param humidity new humidity | |
* @param pressure new pressure | |
*/ | |
virtual void update(float temp, float humidity, float pressure) = 0; | |
}; | |
#endif //OBSERVER_PATTERN_OBSERVER_HPP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment