template-method-fine-grained-override-control

Status: IN

Template Method distinguishes five kinds of called operations (concrete operations, concrete AbstractClass operations, primitive operations, factory methods, and hook operations), offering fine-grained override control: hooks provide default behavior intended for optional override, primitive operations require override, and in C++ the template method itself should be non-virtual, preventing subclasses from subverting the algorithm skeleton.

Justifications

Five operation kinds plus non-virtual skeleton produce the most controlled inheritance in the GoF

Depends on (SL): gof-template-method-five-operation-kinds, hook-operations-overridable-defaults, gof-cpp-template-method-nonvirtual

Depended on by

JSON