Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class HelloBehavior {
public:
virtual void receive(std::string const& msg) = 0;
};
class HelloActor
: public Actor
, public HelloBehavior {
std::string m_greeting;
public:
explicit HelloActor(std::string const& greeting): m_greeting(greeting) {}
void receive(std::string const& msg) override {
std::cout << m_greeting << " " << msg << "\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment