// baseballMasterList.h
// a list of BaseballMaster_C records
// P. Conrad for CISC220, 06J


#ifndef BASEBALLMASTERLIST_H
#define BASEBALLMASTERLIST_H

#include "baseballMaster.h"

#include <iostream> // for ostream reference in printAllBaseballMasters();

class BaseballMasterList_C
{
 private:

  struct Node_S
  {
    BaseballMaster_C *baseballMaster;
    Node_S *next;
  };

  int count;
  Node_S *head;
  Node_S *tail;

 public:
  BaseballMasterList_C() {count=0; head=tail=NULL;} // default constructor
  ~BaseballMasterList_C();  // destructor
  BaseballMasterList_C(const BaseballMasterList_C &orig); // copy constructor 
  BaseballMasterList_C & operator=(const BaseballMasterList_C & right); 

  void add(const BaseballMaster_C &a);
  void print(std::ostream &out) const;
  int getCount() const {return count;} // inline
};

std::ostream & operator << (std::ostream & left, 
			    const BaseballMasterList_C & right);

#endif





