const
virtual function: Shape* get_copy (void)Creates a copy of the
Path
usingcreate_new<Path>()
, which returns a pointer toPath
.get_copy()
then casts this pointer to a pointer toShape
and returns it.This function is used when copying
Pictures
and inSolid::output()
, where objects of types derived fromShape
must be handled in the same way, without their actual types being known.