[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Sep 21 19:26:10 CEST 2004


CVS commit by staikos: 

introduce kst_cast<>.  Example:

KstEquationPtr e = ....;
KstDataObjectPtr p = kst_cast<KstDataObject>(e);


  M +5 -0      kstobject.h   1.28


--- kdeextragear-2/kst/kst/kstobject.h  #1.27:1.28
@@ -221,4 +221,9 @@ These are wrong.  We should not assume t
 };
 
+template <typename T, typename U>
+inline KstSharedPtr<T> kst_cast(KstSharedPtr<U> object) {
+  return dynamic_cast<T*>(object.data());
+}
+
 #endif
 // vim: ts=2 sw=2 et





More information about the Kst mailing list