Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

track.h

Go to the documentation of this file.
00001 
00007 #ifndef TRACK_H
00008 #define TRACK_H
00009 
00010 #include "bitstream.h"
00011 #include <vector>
00012 
00013 typedef std::vector<char *>  stringVec;
00014 
00015 //-----------------------Defines
00016 //used for character sets
00017 #define NONE 0
00018 #define ALPHANUMERIC 1
00019 #define NUMERIC 2
00020 //parity defines
00021 #define ODD 1
00022 #define EVEN 0
00023 
00024 #define ALPHADELIMS "%^?"
00025 #define NUMERICDELIMS ":<>=?"
00026 
00027 
00028 
00029 class Track {
00030 public:
00031         Track(const Bytef *,const int&, const int&);    
00032         Track(const char *, const int&);
00033         void decode(void);
00034         char * getChars(void) const; //return decoded characters (if any)
00035         int getNumber(void) const; //returns track number
00036         bool isValid(void) const;
00037         void setVerbose(const bool&);
00038         int getNumFields(void) const;
00039         char * getField(const int&) const;
00040         int getCharSet(void) const;
00041 
00042 private:
00043         
00044         Bitstream * bitstream;
00045         char * characters;
00046         bool decoded;
00047         int charSet;    //use defines
00048         int number;
00049         bool verbose;
00050         //bool
00051         
00052         //field stuff;
00053         char * fieldBuffer;
00054         stringVec fields;
00055         bool isDelim(const char) const;
00056         void extractFields();
00057 
00058         void setChars(const char *);    
00059         void setChars(const char *, const int &);
00060         bool parityCheck(const Bytef *, const int&, const int&) const;
00061 
00062         //-------------------------Supported Character sets
00063         //BCD   
00064         int findSSBCD(void) const;
00065         int findESBCD(const int&) const;
00066         bool errorCheckBCD(const int&, const int&) const;
00067         bool parseBCD();
00068         void decodeBCD(const int&, const int&);
00069         //ALPHA
00070         int findSSAlpha(void) const;
00071         int findESAlpha(const int&) const;
00072         bool errorCheckAlpha(const int&, const int&) const;
00073         bool parseAlpha();
00074         void decodeAlpha(const int&, const int&);
00075 
00076 
00077         void extractFields2();
00078         bool isDelim(const char, const char *) const;
00079         
00080 };
00081 
00082 #endif

Generated on Thu Apr 7 01:55:47 2005 for StripeSnoop by doxygen 1.3.3