Source of MagicBox.h


  1: //  Created by Frank M. Carrano and Tim Henry.
  2: //  Copyright (c) 2013 __Pearson Education__. All rights reserved.

  4: /** 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: public:
 17:    MagicBox();
 18:    MagicBox(const ItemType& theItem);
 19:    void setItem(const ItemType& theItem);
 20: }; // end MagicBox
 21: #include "MagicBox.cpp"
 22: #endif