Source of MagicBox_setItem.cpp


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

  4: template<class ItemType>
  5: void MagicBox<ItemType>::setItem(const ItemType& theItem)
  6: {
  7:    if (!firstItemStored)
  8:    {
  9:       PlainBox<ItemType>::setItem(theItem);
 10:       firstItemStored = true; // Box now has magic
 11:    }  // end if
 12: }  // end setItem