12345678910111213141516171819202122232425262728293031323334 |
- #pragma once
- #include <string>
- #include <iostream>
- #include <vector>
- #include <memepp/native.hpp>
- class AlgorithmDB
- {
- public:
- struct Record {
- std::string strAlgorithmId;
- std::string strEquipId;
- std::string strThresholdFormula;
- std::string strNewThresholdFormula;
- std::vector<std::string> collectPointVec;//存储当前算是中的采集点号,为了是方便后面转换成测点号
- };
- public:
- AlgorithmDB() {};
- ~AlgorithmDB() {};
- void InitAlgorithmDB(memepp::native_string& folderPath);
- void AddRecord(const Record& record);
- std::vector<Record> GetAllRecords();
- void DeleteRecord(const std::string& algorithmId);
- std::vector<Record> SearchRecord(const std::string& name);
- void UpdateRecord(const std::string& algorithmId, const Record& newRecord);
- private:
- std::string m_filename;
- std::string m_filename_tmp;
-
- };
|