'Tis a Gift to Be Simple

Figure 11.30 is the latest, greatest version of the interface for the HomeItem class.

Figure 11.30. The latest version of the Homeitem class interface (code\hmit5.h)

If you compare this interface with the previous version in Figure 11.21, you'll notice that I've added a few new member functions—namely, Edit, CopyData, and Read. We'll get to Read in due time, but we're going to start with HomeItem::Edit. Unlike a "normal" function in a polymorphic object, where the base class version simply passes the buck to the appropriate worker object, the base class version of Edit (Figure 11.31) is a bit more involved.

Figure ...

Get Learning to Program in C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.