23種設計模式之狀態模式(行爲型,9 State,c++實現)

#include <iostream> #include <string> using namespace std; class Worker; class State { public: virtual void doSomething(Worker* worker) = 0; }; class Worker { public: Worker(); void doSomething() { cu
相關文章
相關標籤/搜索