class MagicBox
1: // Created by Frank M. Carrano and Tim Henry.
2: // Copyright (c) 2013 __Pearson Education__. All rights reserved.
4: /** Listing C4-2 (same as Listing C1-7)
5: @file MagicBox */
7: #ifndef _MAGIC_BOX
8: #define _MAGIC_BOX
9: #include "PlainBox.h"
11: template<class ItemType>
12: class MagicBox : public PlainBox<ItemType>
13: {
14: private:
15: bool firstItemStored;
16:
17: public:
18: MagicBox();
19: MagicBox(const ItemType& theItem);
20: void setItem(const ItemType& theItem);
21: }; // end MagicBox
23: #include "MagicBox.cpp"
24: #endif