Logo Search packages:      
Sourcecode: ardour version File versions  Download package

template<class T_CppObject>
template<class T_CastFrom>
RefPtr< T_CppObject > Glib::RefPtr< T_CppObject >::cast_dynamic ( const RefPtr< T_CastFrom > &  src  )  [inline, static]

Dynamic cast to derived class.

The RefPtr can't be cast with the usual notation so instead you can use

   ptr_derived = RefPtr<Derived>::cast_dynamic(ptr_base);

Definition at line 282 of file refptr.h.

Referenced by Gtk::TreeView::_get_base_model(), Gtk::ComboBoxText::clear(), Gtk::ComboBoxEntryText::clear(), and Gdk::Pixmap::create_from_xpm().

  T_CppObject *const pCppObject = dynamic_cast<T_CppObject*>(src.operator->());


  return RefPtr<T_CppObject>(pCppObject);

Generated by  Doxygen 1.6.0   Back to index