
9 Nov
2004
9 Nov
'04
3 p.m.
On Tue, 9 Nov 2004 09:38:35 -0500 Caleb Epstein <caleb.epstein@gmail.com> wrote:
I'm stumped by how to store this information in any sort of container though, since the properties are of different types. Any thoughts, or is this madness?
If I understand what you are asking, I have been using a "type index" container for a while. However, my solution depends on using static data members of a template class. Specifically, I have a mechanism that assigns a unique runtime integral value to each type, and then that value is used to index into a vector or map of boost::any, and then since it "knows" the type, a cast is performed to the appropriate type. Does that sound like what you are asking about, or am I out to lunch?