What is a common practice for the storage of a list of base class pointers each of which can describe a polymorphic derived class?
To elaborate and in the interest o
You could avoid lots of repetition in GenericShape
by using templates (for the constructors and converters), but the key bit that's missing is having it inherit from Shape
and implement its virtuals -- without it it's unusable, with it it's a pretty normal variant on envelope/implementation idioms.
You may want to use auto_ptr
(or somewhat-smarter pointers) rather than a bare pointer to Shape, too;-).