00001 /* 00002 * Class Card 00003 * 00004 * Holds all info about a card 00005 */ 00006 00007 #ifndef CARD_H 00008 #define CARD_H 00009 #include "track.h" 00010 #include <vector> 00011 00012 00013 //----------------defines 00014 //defines for hasTrack Functions 00015 #define UNKNOWN 0 //reader didn't support this track, so we don't 00016 //know if card contains this track 00017 #define YES 1 //yes, we can read it and yes, it was there 00018 #define NO 2 //yes, we can read it and no, it was not there 00019 class TrackPresent { 00020 public: 00021 int trackNum; 00022 int present; 00023 00024 }; 00025 00026 typedef std::vector<Track> TrackVec; 00027 00028 typedef std::vector<TrackPresent> TrackPresentVec; 00029 00030 00031 class Card { 00032 public: 00033 Card(); 00034 int hasTrack(const int &) const; 00035 void addMissingTrack(const int&); 00036 void addTrack(const Track &); 00037 Track getTrack(const int&) const; 00038 void decodeTracks(void); 00039 void printTracks(void) const; 00040 private: 00041 00042 TrackVec tracks; 00043 TrackPresentVec trackPresent; 00044 }; 00045 #endif