it features a configuration file in which it's defined the data source
(could be plain text or MYSQL data). To do so I made two classes
with the same methods so that they can be called and used the same
way regardless of what they do.
But!! Here I have this problem, how to select the input without recompiling.
First tried...:
Expand|Select|Wrap|Line Numbers
- inputType = config.read("type"); // This reads the source type
- if (inputType=="text"){
- classText* inputData = new classText(...)
- }else{
- classMySQL* inputData = new classMySQL(...)
- }
- inputData->Analyse(..) // And then do all the stuff
declare void* inputData, declare both classes with different names and assign the right object to inputData into an if clause but I haven't succeeded..
Can you help???:):):)
thanks a lot, cheers