#include <typedefs.h>
When compiling with RTTI, we can add an "extra" layer of safeness in many operations, so dynamic_cast is used besides casting by enum.