refptrs and dynamic casting



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]