Example #1
0
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;
}
Example #2
0
int main() {
  std::cout << "==== start ====" << std::endl;
  Client c = Client();
  c.Do();
  std::cout << "==== end ====" << std::endl;
}