Right now in my editor i have a map of parameters that the user can set. A parameter is a simple structure containing the data type and a void* pointing to the data. I inherit different types from it like FloatParam, VectorParam, etc..
When i need to set/retrieve the data, i always have to cast it. What would be a better way of doing this?
Another way that i can think of is to just hardcode all the parameters as class members and i would have a setParam function that consists of a giant switch statement to set the (cast) value to the correct class member