ModuleSQL.h 491 B

12345678910111213141516171819202122232425262728
  1. #ifndef MDD_MODULESQL_H
  2. #define MDD_MODULESQL_H
  3. #include "ModuleBase.h"
  4. #include <iostream>
  5. #include <string>
  6. #include <sqlite3.h>
  7. namespace mdd {
  8. class ModuleSQL : public ModuleBase {
  9. private:
  10. sqlite3* _db;
  11. std::string _tbname;
  12. void erase_keyword(std::string& str, std::string key);
  13. struct _entity {
  14. std::string key;
  15. std::string type;
  16. };
  17. std::vector<_entity> _content;
  18. public:
  19. ModuleSQL(std::string dbname);
  20. ~ModuleSQL();
  21. state update() override;
  22. };
  23. }
  24. #endif