Search code examples
c++qtsimulationextensible

how to make C++ program reads the algorithm from external file?


I know it's a weird question but I want to design a program that will run scenario, this scenario has some functions like searching, deleting ....

these function how they are defined will be up to user, he can define these functionality like defining how the scenario should run.

I'm thinking it can be done in C# by making the client define dll file with interfaces inherited by some classes, using the dynamic linking the assembly can be loaded.

it's something can be done in C# but in C++ I don't know how to do it. I want to keep the software closed, and I was thinking I should write custom scripting language to do it.

I'm using QT framework

Do you some ideas? thanks


Solution

  • Since you're using Qt, you might check out their QtScript framework; it might do what you want, and it's already integrated into Qt so you wouldn't have to set very much up to use it.