c++ design pattern question. single interface multiple implementations? [duplicate]
Possible Duplicate:
How do you declare an interface in C++?
Hi,
What's the preferable way to create single interface and multiple implementations in c++?
For example开发者_如何学C, I'd like to implement kqueue for mac and epoll for linux and share the interface.
Thank you
The Strategy Pattern is probably what you are looking for.
The Abstract Factory Pattern can help you fill in the right implementation when starting up.
精彩评论