int main() { std::cout << "==== start ====" << std::endl; Client c = Client(); c.Do(new ConcreteHandler0(new ConcreteHandler1())); c.Do(new ConcreteHandler1(new ConcreteHandler0())); c.Do(new ConcreteHandler1()); std::cout << "==== end ====" << std::endl; }
int main() { std::cout << "==== start ====" << std::endl; Client c = Client(); c.Do(); std::cout << "==== end ====" << std::endl; }