views:

108

answers:

2
+1  Q: 

Adaptor Pattern

What are the practical uses of Adaptor Pattern?

A: 

For example to adapt an old API to a new API so legacy code can use the new API through the adaptor.

piotr
+2  A: 

The STL stack is a real-life adapter.

Other adapters in the STL are:

  • queues
  • priority queues
  • reverse iterators
  • insert iterators
  • stream iterators

see also http://stackoverflow.com/questions/2698474/design-patterns-used-in-stlstandard-template-library/

Eddy Pronk