I have a simple class and I would like to create a bunch of value presets so user can easily switch between them
1 2 3 4 5 6 7
struct settings_batch{
int a;
int b;
float c;
double d;
std::string e;
};
I.e.
preset 1 - [a = 1; b = 3; c = 2.5; d = 2.75; e = "abcde"]
preset 2 - [a = 4; b = 56; c = 125456.5; d = 5.75; e = "efgeh"]
The original class is massive so I don't want to create a vector of values for each parameter
What is the best to implement this so it scales well for a large class?
Also I would not want to make the declarations in main - code would get very messy as a result - main would only take user's input - say use present 4 - and then load it
I was thinking to create a singleton with - containing a vector of instances of settings_batch - each containing values for each corresponding preset - and then have an instance my actual function - which pulls the [i] element from that vector. Not 100% sure if that is good design practice (I am a noob)