00001 00002 00003 00004 //----------------------------------------------------------------------------- 00005 // CVS: $Revision: 2105 $, $Date: 2006-04-17 17:58:30 +0100 (Mon, 17 Apr 2006) $, $Author: rsc $ 00006 //----------------------------------------------------------------------------- 00007 #ifndef BYTEARRAY_H 00008 #define BYTEARRAY_H 00009 00010 #include <string> 00011 //----------------------------------------------------------------------------- 00015 class ByteArray 00016 { 00017 public: 00020 ByteArray(int aRecLength); 00021 00025 ByteArray(int aRecLength, int aNumRecords); 00026 00028 ~ByteArray(); 00029 00031 int gobble(const std::string& aFileName); 00032 00035 void dump(const std::string& aFileName); 00036 00039 void markColumn(int aByte0) { mNextByte = aByte0; } 00040 00045 void getNextWord(int aWordSize, char* aWordAry); 00046 00049 void putNextWord(int aWordSize, char* aWordAry); 00050 00052 int getNumRecords() { return mNumRecords; } 00053 00054 private: 00057 char* mBufferAry; 00059 int mNumRecords; 00061 int mRecLength; 00063 int mTotalSize; 00065 int mNextByte; 00066 }; // ByteArray 00067 //----------------------------------------------------------------------------- 00068 #endif