Created
July 25, 2020 16:57
-
-
Save JohnMurray/e51729c527006fe1274dd7a4ae8bb034 to your computer and use it in GitHub Desktop.
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
class HelloBehavior: public Behavior { | |
virtual void receive(std::string const& msg) = 0; | |
}; | |
class HelloActor | |
: public Actor | |
, public HelloBehavior { | |
std::string m_greeting; | |
public: | |
HelloActor(std::string const& greeting): m_greeting(greeting){}; | |
void receive(std::string const& msg) { | |
std::cout << m_greeting << " " << msg << "\n"; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment