Hi,
I have abstract base class with some kids deriving from it. I want its kids to be concrete classes But I don't want to implement the all methods of the class. I'm trying to find a trick to go around doing this and I'm running out of thought on this. below is illustrative code of what I want to do.
Thanks for your help
class BaseDB {
BaseDB();
virtual ResultSet getResults()=0;
virtual void setResults(std::string sql)=0;
virtual void someMoreFunction()=0;
};
class FirstChild :public BaseDB {
ResultSet getResults(){
//do some stuffs
}
void setResults(std::string sql){
//some more stuffs
}
//I don't want to implement someMoreFunction() in this class
}
class SecondChild :public BaseDB {
ResultSet getResults(){
//do some stuffs
}
void someMoreFunction(){
//some more stuffs
}
//I don't want to implement setResults(std::string sql) in this class
}