FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
template<class T >
template< class T > T * FB::PluginEventSource::get_as ( )
inline

Templated convenience function for performing a dynamic cast of this object.

PluginWindow* wnd = evtSource->get_as<PluginWindow>();
Exceptions
std::bad_castThrown when bad cast.
Returns
null if it fails, else T*

Definition at line 89 of file PluginEventSource.h.

90  {
91  T* tmp = dynamic_cast<T*>(this);
92  if (!tmp)
93  throw std::bad_cast();
94  return tmp;
95  }