ROSE  0.9.10.89
FunctionIdDatabaseInterface.h
1 #ifndef FUNCTION_ID_DATABASE_INTERFACE_H
2 #define FUNCTION_ID_DATABASE_INTERFACE_H
3 
4 #include "sqlite3x.h"
5 #include "LibraryInfo.h"
6 #include "FunctionInfo.h"
7 
8 
16 {
17 
24  {
25  public:
36  FunctionIdDatabaseInterface(std::string dbName);
37 
38 
50  void createTables();
51 
52 
53  // @brief Add an entry for a function to the database
54  void addFunctionToDB(const FunctionInfo& fInfo, bool replace = false);
55 
60  bool matchFunction(FunctionInfo& fInfo);
61 
62 
63  // @brief Add an entry for a library to the database
64  void addLibraryToDB(const LibraryInfo& lInfo, bool replace = false);
65 
70  bool matchLibrary(LibraryInfo& fInfo);
71 
72 
73  private:
74  // @brief The name of the database
75  std::string database_name;
76 
77  // @brief SQLite database handle
78  sqlite3x::sqlite3_connection con;
79  };
80 }
81 
82 
83 #endif
84 
bool matchFunction(FunctionInfo &fInfo)
Lookup a function in the database.
class FunctionInfo Combines all the information to uniquely identify a single function in one object...
Definition: FunctionInfo.h:21
FunctionIdDatabaseInterface(std::string dbName)
FunctionIdentification.
void createTables()
createTables Make sure that all the tables are defined in the function identification database...
Creates and holds the handle for the sqlite database used for storing and matching libraries and func...
bool matchLibrary(LibraryInfo &fInfo)
Lookup a library in the database.