some Design Patterns in C++