I'm wondering if i could create something like map<key,class> kind of template. if it's even possible? how would i access, say the variables in that class?
Why not? Just use the map like you would use it for a type of plain old data, only keeping in mind that what the [ ] operator will be giving you back is a reference to a class. Just like a vector!