0

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

Maher
  • 3
  • 1

2 Answers2

3

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.

Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
  • thanks Jeremy I need to read more about it, I have list of objects that should be used in the scripting langugae, this list will be changed every time instant so there will be lot of events and I want to know if the performance will be good, because these objects will have methods to be invoked from the script it's two way heavy tasks, and I mean very heavy, do you have information if its performance will be good, thanks a lot, using Qt will be great. – Maher Jun 24 '11 at 04:09
  • I've never used QtScript myself, so I can't speak to its performance; OTOH TrollTech/Nokia's developers seem to be quite good at producing well-performing code, so I'd be surprised if performance would be too terrible. Don't expect native-code speed, of course; I don't think they've developed a JIT compiler or anything like that... – Jeremy Friesner Jun 28 '11 at 06:26
2

Use a scripting language; this is exactly what they are for. Lua is what I would pick as my default go-to for embedded languages, but others swear by Python. There are embedded versions of JavaScript as well.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982