How to test object type and do casting in G::O::I
- From: Robin Lee <robinlee sysu gmail com>
 
- To: gtk-perl-list gnome org
 
- Subject: How to test object type and do casting in G::O::I
 
- Date: Tue, 8 Aug 2017 12:18:04 +0800
 
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]