#include <processextractor.h>
Public Member Functions | |
ProcessExtractor () | |
~ProcessExtractor () | |
void | addToDatabase () |
QList< Process > | getList () |
Private Member Functions | |
int | executeProcess () |
int | insertIntoDB (std::string) |
int | connectToDB (int flag) |
void | closeDB () |
Private Attributes | |
sqlite3 * | db |
ProcessExtractor::ProcessExtractor | ( | ) |
ProcessExtractor::~ProcessExtractor | ( | ) |
void ProcessExtractor::addToDatabase | ( | ) |
Function to parse query to insert rows into sqlite database table from the file populated in the function executeProcess().
void ProcessExtractor::closeDB | ( | ) | [private] |
Function to close the sqlite database connection
int ProcessExtractor::connectToDB | ( | int | flag | ) | [private] |
This function establishes connection with the sqlite database.
int ProcessExtractor::executeProcess | ( | ) | [private] |
This function executes the top command and populates the result in an output file.
QList< Process > ProcessExtractor::getList | ( | ) |
Function to execute select query on processes table of sqlite database.
int ProcessExtractor::insertIntoDB | ( | std::string | query | ) | [private] |
Function to exceute the insert query for sqlite database. Called by addToDatabase().
sqlite3* ProcessExtractor::db [private] |