danni.coy Posted October 13, 2011 Posted October 13, 2011 supposing I have overridden a function in a subclass is there anyway I can access the superfunctions version of the function. In D I would use the super qualifier. class foo { void do_thing() { // do default stuff } }; class bar : foo { void do_thing() { //handle special case //then handle the general case super.do_thing(); } };
ulf.schroeter Posted October 13, 2011 Posted October 13, 2011 Use <base class name>::<overridden function name> syntax class foo { void do_thing() { // do default stuff } }; class bar : foo { void do_thing() { //handle special case //then handle the general case foo::do_thing(); } };
Recommended Posts