REMOVED all classes and header files dealing with old classes
This commit is contained in:
parent
aee543a7b4
commit
b4f8432c4c
@ -1,30 +0,0 @@
|
|||||||
// void setCPU(){};
|
|
||||||
|
|
||||||
/* this function's Incoming arguments are a pointer to the CPU class
|
|
||||||
"CPU *pCPU" and the new mainclock speed
|
|
||||||
*/
|
|
||||||
void setCPUmainclock(CPU *pCPU, std::string mkey, std::string mmainclock) {
|
|
||||||
pCPU->HardwareSpecs[mkey] = mmainclock;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setCPUboostclock(CPU *pCPU, std::string mkey, std::string mboostclock) {
|
|
||||||
pCPU->HardwareSpecs[mkey] = mboostclock;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setCPUarch(CPU *pCPU, std::string mkey, std::string march) {
|
|
||||||
pCPU->HardwareSpecs[mkey] = march;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setCPUbits(CPU *pCPU, std::string mkey, int mbits) {
|
|
||||||
pCPU->HardwareSpecs[mkey] = mbits;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setCPUcores(CPU *pCPU, std::string mkey, int mcores) {
|
|
||||||
pCPU->HardwareSpecs[mkey] = mcores;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setCPUthreads(CPU *pCPU, std::string mkey, int mthreads) {
|
|
||||||
pCPU->HardwareSpecs[mkey] = mthreads;
|
|
||||||
// create an IF catch to set threads cores * 2 as a fall back
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
// void setCPU(){};
|
|
||||||
|
|
||||||
/* this function's Incoming arguments are a pointer to the Hardware class
|
|
||||||
"Hardware *pHardware" and the new mainclock speed
|
|
||||||
*/
|
|
||||||
void setHardwaremanufacturer(Hardware *pHardware, std::string mmanufacturer) {
|
|
||||||
// cout << "Coming from the setHardwaremanufacturer function in setHardware" << endl;
|
|
||||||
|
|
||||||
pHardware->manufacturer = mmanufacturer;
|
|
||||||
// cout << "Leaving setHardwaremanufacturer()\n\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
void setHardwarereleasedyear(Hardware *pHardware, int mreleasedyear) {
|
|
||||||
pHardware->releasedyear = mreleasedyear;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setHardwaremodel(Hardware *pHardware, std::string mmodel) {
|
|
||||||
pHardware->model = mmodel;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Hardwaredictadd(CPU *pHardware, std::string mkey, std::string mvalue) {
|
|
||||||
|
|
||||||
// cout << "The incoming key/value is: " << mkey << "/" << mvalue << endl;
|
|
||||||
// cout << "\nThe current manufacturer is: " << pHardware->HardwareSpecs[mkey] << endl;
|
|
||||||
pHardware->HardwareSpecs[mkey] = mvalue;
|
|
||||||
// cout << "The new manufacturer is: " << pHardware->HardwareSpecs[mkey];
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <vector>
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* THIS PORTION OF CODE WAS DONATED BY szaszmango from brodie's server!
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This magic returns a vector which contain all the objects created using the CPU class
|
|
||||||
std::vector<CPU> genCPUclasses() {
|
|
||||||
std::vector<CPU> resultCpuList;
|
|
||||||
std::ifstream cpuList{"lists/cpulist", std::ifstream::in};
|
|
||||||
|
|
||||||
if(cpuList.is_open()) {
|
|
||||||
std::cout << "File opened\n";
|
|
||||||
}
|
|
||||||
else { std::cout << "Failed to open file!\n"; }
|
|
||||||
|
|
||||||
std::string line;
|
|
||||||
while (std::getline(cpuList, line)) {
|
|
||||||
CPU cpu;
|
|
||||||
cpu.HardwareSpecs["model"] = line;
|
|
||||||
resultCpuList.push_back(std::move(cpu));
|
|
||||||
std::cout << "Loaded CPU: " << line << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
return resultCpuList;
|
|
||||||
}
|
|
||||||
@ -1,74 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <map>
|
|
||||||
#include <string>
|
|
||||||
#include <list>
|
|
||||||
|
|
||||||
// #define class struct // Uncomment this line to switch all the classes to structs
|
|
||||||
|
|
||||||
// using namespace std;
|
|
||||||
|
|
||||||
class Hardware {
|
|
||||||
|
|
||||||
public:
|
|
||||||
std::string manufacturer;
|
|
||||||
std::string model;
|
|
||||||
int releasedyear;
|
|
||||||
|
|
||||||
// example of how to set a dictionary item
|
|
||||||
// std::string myval = HardwareSpecs.at("manufacturer");
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
class Mobo: public Hardware {
|
|
||||||
public:
|
|
||||||
int pciegen;
|
|
||||||
int piceslots;
|
|
||||||
int dimmslots;
|
|
||||||
int dualchannel; // This is an int so 1 = dualchannel and 2 = quad channel
|
|
||||||
int ramspeed;
|
|
||||||
std::string comment;
|
|
||||||
|
|
||||||
std::map<std::string, std::string> HardwareSpecs = {
|
|
||||||
{"manufacturer", "The Gnomes part 2"},
|
|
||||||
{"model", "Honey Bomb"},
|
|
||||||
{"ReleasedYear", "2025"},
|
|
||||||
{"pciegen", "4"},
|
|
||||||
{"pcieslots", "3"},
|
|
||||||
{"dimmslots", "2"},
|
|
||||||
{"ramchannels", "2"},
|
|
||||||
{"ramspeed", "6000"},
|
|
||||||
{"comment", "If on AM5 platform - update BIOS before booting!"},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
class CPU: public Hardware {
|
|
||||||
public:
|
|
||||||
std::map<std::string, std::string> HardwareSpecs = {
|
|
||||||
{"manufacturer", "The Gnomes part 2"},
|
|
||||||
{"model", "Honey Bomb"},
|
|
||||||
{"ReleasedYear", "2025"},
|
|
||||||
{"bits", "64"},
|
|
||||||
{"igpu", "false"},
|
|
||||||
{"igpusize", "N/A"},
|
|
||||||
{"cores", "4"},
|
|
||||||
{"threads", "8"},
|
|
||||||
{"l1cache", "32Mb"},
|
|
||||||
{"l2cache", "32Mb"},
|
|
||||||
{"l3cache", "32Mb"},
|
|
||||||
{"pcielanes", "24"},
|
|
||||||
{"maxram", "256Gb"},
|
|
||||||
{"mainclock", "3Ghz"},
|
|
||||||
{"boostclock", "3.2Ghz"},
|
|
||||||
{"architecture", "x86_64"},
|
|
||||||
{"memoryrange", "00:00 - set me!"},
|
|
||||||
{"microcode", "unchanged"},
|
|
||||||
{"kerneldriver", "intel"},
|
|
||||||
{"comment", "If on AM5 platform - update BIOS before booting!"},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
class GPU: public Hardware {
|
|
||||||
public:
|
|
||||||
std::map<std::string, GPU> GPUSpecs;
|
|
||||||
// GPUSpecs["Ram"] = GPU { "Ram", "12Gb" };
|
|
||||||
};
|
|
||||||
@ -3,10 +3,10 @@
|
|||||||
#include <sqlite/command.hpp>
|
#include <sqlite/command.hpp>
|
||||||
#include <sqlite/result.hpp>
|
#include <sqlite/result.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "lists/hardware.h"
|
// #include "lists/hardware.h"
|
||||||
#include "lists/cpu.h"
|
// #include "lists/cpu.h"
|
||||||
#include "include/setcpu.h"
|
// #include "include/setcpu.h"
|
||||||
#include "include/sethardware.h"
|
// #include "include/sethardware.h"
|
||||||
#include <sqlite3.h>
|
#include <sqlite3.h>
|
||||||
|
|
||||||
// Begin testing of SQLite3
|
// Begin testing of SQLite3
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user