相关代码 |
|
title() //--> 26.4 The TEMPLATE METHOD Pattern (cont.) sputc is an example of the TEMPLATE METHOD Pattern (Nothing to do w/C++ templates) Base class defines an algorithm that calls primitive operations Algorithm depends on derived class defining an appropriate operation The template method combines primitive operations into a larger algorithm prev |top |next
相关资源 |
|