// baseballMaster.cc  P. Conrad for CISC220, 06J
// Class for Lahman Baseball Database (www.baseball1.com), version 5.3

// See license and copyright statement at bottom of file



#include "date.h"
#include "event.h"
#include "baseballMaster.h"
#include <cstring>
#include <iostream>
#include <cstdlib>
#include "strtokWithQuotedStrings.h"


  // construct one object from a line in the Master.csv file

BaseballMaster_C::BaseballMaster_C( char * const inputLine)
{
  char * lahmanIDPtr = strtok(inputLine,",");
  lahmanID = atoi(lahmanIDPtr);
  
  char * playerIDPtr = strtok(NULL,",");
  playerID = new char[strlen(playerIDPtr)+1];
  strcpy(playerID,playerIDPtr);
  
}
  

// print just a few key fields
void BaseballMaster_C::print(std::ostream & out) const 
{
  out << "@@@ NOT IMPLEMENTED YET: " 
      << __FILE__ << ", line" << __LINE__ << std::endl;
}


// COPYRIGHT NOTICE:

// This code corresponds to the data layout of the Lahmann Database,
// which is copyrighted by Sean Lahmann.  The data and formats here
// are used by special permission of Sean Lahmann, granted to Phill 
// Conrad for use in Computer Science courses at the University of 
// Delaware.  You must obtain permission from Sean Lahmann to use this
// data and/or data format for any other purpose.  For more details,
// visit www.baseball1.com

