const_cast and dynamic_cast is added.