Thursday, April 22, 2010

Nonvirtual Interface (NVI)

The Nonvirtual Interface (NVI), has two interfaces, a non-virtual interface for the clients, and virtual interfaces for its derived classes.

The author of the following referenced book recommends this idiom over exposing virtual functions to clients.

Reference: "Exceptional C++ Style" by Herb Sutter, Addison-Wesley, 2004, p. 132.

No comments:

Post a Comment