How to test object type and do casting in G::O::I



I am playing GIRepository with G::O::I.
I get a GIRepository::BaseInfo object from gir get_info funtion.

One question is how to test whether this object is a GIRepository::CallableInfo.

And another question is how to cast this object to a GIRepository::CallableInfo.

GIRepository::BaseInfo is the base class of GIRepository::CallableInfo, and the latter further has multiple derived classes.


-robin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]