المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : a Design and technical issue



C++ Programming
08-19-2009, 02:21 PM
I am developing an application that has to act on external data that is both described and provided by the user, the client.
Currently I have created a wizard and the user can choose either to provide an SQL database (thus asking him for the DSN and the SQL query) or an XML file (thus asking him to for the appropriate xQuery query) or a CSV file (thus asking him for the file where it resides and the delimiting caracater).

Now, this may not be sufficient : I can imagine a plenty of complex scenario such the data cannot fall within those 3 types.

What I am tempted to do then is to make it possible for the application to call an external code provided by the user and which will be responsible for retrieving the data so that the application can deal with it.

My application is written in unmanaged C++, but the user may want to write that portion of code in JAVA, C# etc.

My only idea, which is unfortunately still not clear (regarding implementation) is to write a sort of specification of a COM object : user must write his data-code following that spec. and my application should be able to load available COM objects that fall with particular class and allow the user to select his implementation. Then the application is capable of calling that COM object and retrieving data passed by it.
(I am not even good at COM development)

So do you have suggestion, is there a sample application I can inspire from ?

Thank you in advance.

Easy Profiler : a compile-time profiler for C++
www.potatosoftware.com