00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __BxBinxParser__
00018 #define __BxBinxParser__
00019
00020 #include "BxDataset.h"
00021 #include "BxBinaryFile.h"
00022 #include "BxDataObjects.h"
00023
00024 class BxBinxFile;
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 class DECLSPEC BxBinxParser : public BxObject
00042 {
00043 public:
00044 BxBinxParser();
00045 virtual ~BxBinxParser();
00046
00047 virtual char* className() const { return "BxBinxParser"; }
00048 BxDataset* getDataset() const { return datasetRoot_; }
00049 BxBinaryFile* getBinaryFile() { return bfile_; }
00050
00051 virtual bool parse(const char*) { return false; }
00052
00053 protected:
00054 void toUpperCase(char* s);
00055 void extractFilePath(const char* binxFile);
00056
00057 void setBinaryFile(BxBinaryFile* bfile);
00058 void createBinaryFile(const char* filename);
00059
00060 BxDataObjects& getDefinitions() { return definitions_; }
00061 const char* getPath() const { return path_; }
00062
00063 private:
00064 void dropDatasetFile()
00065 {
00066 datasetRoot_ = NULL;
00067 bfile_ = NULL;
00068 }
00069
00070
00071 BxDataset* datasetRoot_;
00072 BxBinaryFile* bfile_;
00073
00074
00075 BxDataObjects definitions_;
00076 char* path_;
00077
00078 friend class BxBinxFile;
00079 };
00080
00081 #endif
00082