Here's a bit of pseudocode describing the situation I'm in...
Code:
class Base{
public:
void method(){
//do some stuff
protectedFunc(foo);
//do some stuff with foo
};
protected:
void protectedFunc(Foo* foo){
//do some stuff
};
}
class Inherited : public Base{
public:
void method(){
//do same stuff as Base
protectedFunc(foo);
//do same stuff with foo
}
protected:
void protectedFunc(Foo* foo){
//do some DIFFERENT stuff
};
}
Obviously, I could copy and paste the code like I have listed here. Alternatively, I could divide the function into methodPartA(), protectedFunc(), and methodPartB(). This just seems a bit ungainly in terms of appearance. Is there a better way that I'm missing?