#ifndef DATAMANAGERBASE_H #define DATAMANAGERBASE_H #include #include class DataManagerBase { public: enum ExcuteType{ none = 0, //当前为空 decode = 1, //执行解析 getData //执行获取数据 }; public: ExcuteType toExcuteType(){ return type;} void setExcuteType(ExcuteType t){type = t;} virtual void doExcute() = 0; //解析文件 插入数据库 virtual void decodeToMysql() = 0; // virtual void getDataFromMysql() = 0; void setDecodeFile(QString filePath){decodeFilePath = filePath;} QString getDecodeFile(){return decodeFilePath;} void setDataDate(QString date){decodeDate = date;} QString getDataDate(){return decodeDate;} void clearParam(){ params.clear(); } void addParam(QString key,QString value){ params.insert(key,value); } QString getParam(QString key){ return params.value(key); } private: QString decodeFilePath; QString decodeDate; ExcuteType type = decode; QHash params;//参数 }; #endif // DATAMANAGERBASE_H