refptrs and dynamic casting
- From: Paul Davis <paul linuxaudiosystems com>
- To: gtkmm-list gnome org
- Subject: refptrs and dynamic casting
- Date: Wed, 30 Nov 2005 13:40:07 -0500
Suppose you do this:
RefPtr<Action> act = ui_manager.get_action("<Actions>/Foo/Bar");
but you also know that the action is really a toggle action, and you
want to change its current status. so you want:
RefPtr<Action> toggle;
toggle->set_active (yn);
How to get from the refptr to Action to a refptr to ToggleAction.
normally one would use a dynamic cast, but RefPtr's are not pointers ...
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]