B
Bart Kevelham
Hi all,
I have the following problem
I need to store a list of simple objects. The general form of these
objects is:
- std::string type
- std::string name
- value
The problem lies within the value. This can be of any type. A
std::string or an openGL float4 or whatever. This could easily be
implemented with a template, but the problem is this: I have to store
instances of this object in something like a stl vector or list
(Anything that is growable). So the final list can contain one instance
whose value is a string and another instance whose value is an integer
(for example). I can't figure out a way to do this. Does anyone of you
guys/girls have an idea?
Kind regards,
Bart
I have the following problem
I need to store a list of simple objects. The general form of these
objects is:
- std::string type
- std::string name
- value
The problem lies within the value. This can be of any type. A
std::string or an openGL float4 or whatever. This could easily be
implemented with a template, but the problem is this: I have to store
instances of this object in something like a stl vector or list
(Anything that is growable). So the final list can contain one instance
whose value is a string and another instance whose value is an integer
(for example). I can't figure out a way to do this. Does anyone of you
guys/girls have an idea?
Kind regards,
Bart