2025-01-28 10:06:50 -07:00
|
|
|
#include <iostream>
|
2025-01-30 22:21:42 -07:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <sqlite/command.hpp>
|
|
|
|
|
#include <sqlite/result.hpp>
|
2025-01-28 10:06:50 -07:00
|
|
|
#include <string>
|
2025-01-28 11:46:16 -07:00
|
|
|
#include "lists/hardware.h"
|
2025-01-28 12:17:10 -07:00
|
|
|
#include "lists/cpu.h"
|
2025-01-28 15:51:35 -07:00
|
|
|
#include "include/setcpu.h"
|
2025-01-29 10:18:17 -07:00
|
|
|
#include "include/sethardware.h"
|
2025-01-30 22:21:42 -07:00
|
|
|
#include <sqlite3.h>
|
|
|
|
|
|
|
|
|
|
// Begin testing of SQLite3
|
2025-01-30 23:18:45 -07:00
|
|
|
// static int createDB(const char* s);
|
|
|
|
|
// static int createTable(const char* s);
|
2025-01-30 22:21:42 -07:00
|
|
|
|
2025-01-28 10:06:50 -07:00
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
|
2025-01-30 23:18:45 -07:00
|
|
|
// const char* dbfile = "hardware.db";
|
|
|
|
|
// sqlite3* hardwareDB;
|
2025-01-30 22:21:42 -07:00
|
|
|
|
2025-01-30 23:18:45 -07:00
|
|
|
// createDB(dbfile);
|
2025-01-30 22:21:42 -07:00
|
|
|
// createTable(dbfile);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* //Create the CPU classes from the cpulist file
|
|
|
|
|
int counter= 0;
|
2025-01-29 20:55:57 -07:00
|
|
|
auto cpus = genCPUclasses();
|
|
|
|
|
for (CPU& cpu: cpus) {
|
|
|
|
|
// cpus[counter].HardwareSpecs["model"] = "value";
|
|
|
|
|
std::cout << cpu.HardwareSpecs["model"] << " loaded at index: " << counter << std::endl;
|
|
|
|
|
counter++;
|
|
|
|
|
}
|
2025-01-30 22:21:42 -07:00
|
|
|
*/
|
2025-01-29 18:58:36 -07:00
|
|
|
//Testing the new dictionaries
|
|
|
|
|
// cout << "Lets try the setCPU function!\n";
|
2025-01-29 20:55:57 -07:00
|
|
|
// std::cout << "A7800x3d main clock speed is: " << A7800x3d->HardwareSpecs["mainclock"] << std::endl;
|
2025-01-29 18:58:36 -07:00
|
|
|
// setHardwaremanufacturer(A7800x3d, "AMD");
|
|
|
|
|
// setCPUcores(A7800x3d, "cores", 8);
|
|
|
|
|
// setCPUthreads(A7800x3d, "threads", 16);
|
|
|
|
|
// setCPUmainclock(A7800x3d, "mainclock", "4.8 Ghz");
|
|
|
|
|
// setCPUboostclock(A7800x3d, "boostclock", "5.2 ghz");
|
|
|
|
|
// cout << "\n\nA7800x3d new main/boost speed is: " << A7800x3d->HardwareSpecs["mainclock"] << "/" << A7800x3d->HardwareSpecs["boostclock"] << endl;
|
2025-01-29 11:26:54 -07:00
|
|
|
// cout << "A7800x3d manufacturer is: " << A7800x3d->HardwareSpecs["manufacturer"] << "\n\n\n";
|
2025-01-29 10:18:17 -07:00
|
|
|
|
|
|
|
|
|
2025-01-29 18:58:36 -07:00
|
|
|
system("sleep 1s");
|
2025-01-28 10:06:50 -07:00
|
|
|
return 0;
|
|
|
|
|
}
|