hardwaredb/include/sethardware.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

29 lines
962 B
C

// 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, 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, string mmodel) {
pHardware->model = mmodel;
}
void Hardwaredictadd(CPU *pHardware, string mkey, 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];
}