Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualnfactorial

Posted 24 May 2013 - 06:28 PM

 Ahh, I guess I miissed what you were asking sorry. In the example I would usually call the VPause method something more like OnPause or OnPauseChanged though it's all a matter of opinion there smile.png I think the name VPause threw me as I wasn't sure what the V was for.

 

I generally can take either approach, depending on the situation.  I would usually base the choice on whether it is valid for the base implementation to be skipped ie. if you allow someone to overriide the function then you are stating that "if you don't want the default behaviour, don't call the base class". If the base functionality is not optional (ie. the base class implementation must be performed regardless of what a derived class wants to do) then I would do what your first example does.

 

n!


#1nfactorial

Posted 24 May 2013 - 06:28 PM

 Ahh, I guess I miissed what you were asking sorry. In the example I would usually call the VPause method in the first example something more like OnPause or OnPauseChanged though it's all a matter of opinion there :) I think the name VPause threw me as I wasn't sure what the V was for.

 

I generally can take either approach, depending on the situation.  I would usually base the choice on whether it is valid for the base implementation to be skipped ie. if you allow someone to overriide the function then you are stating that "if you don't want the default behaviour, don't call the base class". If the base functionality is not optional (ie. the base class implementation must be performed regardless of what a derived class wants to do) then I would do what your first example does.

 

n!


PARTNERS