Add methods in RefPointer to allow casting RefPointers of derived classes to RefPoint...
authorGeorge Kiagiadakis <kiagiadakis.george@gmail.com>
Mon, 14 Jun 2010 15:39:42 +0000 (18:39 +0300)
committerGeorge Kiagiadakis <kiagiadakis.george@gmail.com>
Mon, 14 Jun 2010 15:39:42 +0000 (18:39 +0300)
commit0749dc15250d7496f51b20ad6f1b4f932a782a78
tree9b25d200cf125fbebfa7dac99d1a61f959147c09
parent18d1abac21b902c5be47c01cd4df5d93fb3340fd
Add methods in RefPointer to allow casting RefPointers of derived classes to RefPointers of their base classes.
This allows for example to implicitly cast a QGst::ElementPtr to a QGst::ObjectPtr without using staticCast()
or dynamicCast(). The use of a static assertion and boost's type traits ensures that you cannot cast
in the opposite direction (i.e. ObjectPtr to ElementPtr).
src/QGlib/refpointer.h
tests/refpointertest.cpp