basically, i want to have something like:
class DataProcessor{
};
however, in the future, i will need to pass DataProcessor’s instance to some other functions, because DataProcessor contains some crucial data.
what I got in mind is to separate the members from methods:
class DataProcessorCore{};
class DataProcessor : public DataProcessorCore {};
Is this a common way to do this job? or there is some patterns out there that I can fit my ideas into?
thanks a lot
Maybe the Strategy Pattern is the one you are looking for. This would give you the oppurtunity to change the methods working on your data at runtime.
wiki: strategy pattern