hardwaredb/lists/hardware.h
ganome 2149ec7092
Started refactoring floating variables in the Classes into dictionaries
for easier indexing.  First example @ sethardwaremanufacturer() in
sethardware.h
2025-01-29 10:18:17 -07:00

98 lines
2.0 KiB
C++

#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;
std::map<std::string, std::string> HardwareSpecs = {
{"manufacturer", "The Gnomes"},
{"model", "Honey Bomb"},
{"ReleasedYear", "2025"},
};
std::string myval = HardwareSpecs.at("manufacturer");
// HardwareSpecs.at("manufacturer") = "tester";
};
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;
Mobo() {
manufacturer = "Forest Gnomes";
model = "HoneyJar";
releasedyear = 2025;
pciegen = 4;
piceslots = 3;
dimmslots = 2;
dualchannel = 1;
ramspeed = 6000;
comment = "If on AM5 platform - update BIOS before booting!";
};
};
class CPU: public Hardware {
public:
bool bits64;
bool igpu;
int igpusize;
int cores;
int threads;
int l1cache;
int l2cache;
int l3cache;
int pcielanes;
int maxram;
float mainclock;
float boostclock;
std::string architecture;
std::string memoryrange;
std::string microcode;
std::string kerneldriver;
std::string comment; // This shoule be used to warn the user about updating BIOS on AM5 before booting
CPU() {
manufacturer = "Forest Gnomes";
model = "HoneyPot";
releasedyear = 2025;
bits64 = true;
igpu = false;
igpusize = 0;
cores = 4;
threads = 2;
l1cache = 32;
l2cache = 32;
l3cache = 32;
pcielanes = 24;
maxram = 128;
mainclock = 2;
boostclock = 2.2;
architecture = "x86_64";
memoryrange = "00:00";
microcode = "acorns";
kerneldriver = "Forest Gnome Special";
comment = "";
};
};
class GPU: public Hardware {
public:
map<std::string, GPU> GPUSpecs;
// GPUSpecs["Ram"] = GPU { "Ram", "12Gb" };
};