J
Jim Strathmeyer
I'm writing code with a whole lot of inheritance and am finding myself
getting an object's type a lot. I do this by having a enumerated data
member in the base class, and setting it in the derived classes'
constructors (and getting the type through a member function.)
Is there any way to do this automatically? I've check the normal places,
and can't find anything about this. (Please let me know if I've missed
something.)
Or, is this approach representative of bad programming style?
getting an object's type a lot. I do this by having a enumerated data
member in the base class, and setting it in the derived classes'
constructors (and getting the type through a member function.)
Is there any way to do this automatically? I've check the normal places,
and can't find anything about this. (Please let me know if I've missed
something.)
Or, is this approach representative of bad programming style?