Source of Listing12-5.h


  1: //  Created by Frank M. Carrano and Timothy M. Henry.
  2: //  Copyright (c) 2017 Pearson Education, Hoboken, New Jersey.

  4: // Listing 12-5.

  6: /** ADT sorted list using ADT list.
  7:  @file SortedListAsA.h */
  8: #ifndef SORTED_LIST_AS_A_
  9: #define SORTED_LIST_AS_A_
 10: #include <memory>
 11: #include "SortedListInterface.h"
 12: #include "ListInterface.h"
 13: #include "Node.h"
 14: #include "PrecondViolatedExcept.h"

 16: template<class ItemType>
 17: class SortedListAsA : public SortedListInterface<ItemType>,
 18: private LinkedList<ItemType>
 19: {
 20: public:
 21:    SortedListAsA();
 22:    SortedListAsA(const SortedListAsA<ItemType>& sList);
 23:    virtual ~SortedListAsA();
 24:    
 25:    // <The rest of the public section is the same as in SortedListHasA in Listing 12-3.>
 26:    
 27: }; // end SortedListAsA
 28: #include "SortedListAsA.cpp"
 29: #endif