title: How to deduce subtype of a class from a base pointer
body: <p>I have a base class (Notification) and two subclasses (WebNotification and DesktopNotification). I receive WebNotifications and DesktopNotifications from an external source and than I pass them along as Notification pointers to an GUI entity that's supposed to do different things based on the type of notification.
  How can I deduce the subtype based on a Notification* ?</p>
  
  <p>I know adding an enum with the type to the Notification class would work but it doesn't seem like an elegant solution.</p>
  
  <p>Do I have any alternatives?</p>