Mike Trader
Mike Trader

Reputation: 8704

C++ Implementing scripting (Repeatable Actions)

I have a desktop app written in C++. It does a variety of different things and interacts with a database. I have made most actions that need to be performed selectable from a list. Actions are performed serially on data sets and need to be saved and played back at a later time on a different result set.

The actions are typically performed from a drop down menus and there are no load/save to disk operations. I dont' necessarily need scripting capability, but if thats the easiest way to go that's fine.

How would you approach this?

Added, This application is NOT written in OOP style

Upvotes: 0

Views: 270

Answers (3)

Klaim
Klaim

Reputation: 69682

  • lua with LuaBind is quite widely used
  • Python with boost::python is also widely used but heavier on space

Now I know less know scripting languages that are useful in game programming, so useful in whatever application you need scripting for:

  • Falcon : the more versatile and flexible solution I know and use
  • ChaiScript : the easier to integrate I know
  • AngelScript : didn't try yet
  • GameMonkey : didn't try yet
  • IO : didn't try yet

Upvotes: 0

jon hanson
jon hanson

Reputation: 9408

Sounds like the GoF Command design pattern:

http://en.wikipedia.org/wiki/Command_pattern

http://www.oodesign.com/command-pattern.html

Upvotes: 1

Roddy
Roddy

Reputation: 68033

Lua

It's a great, simple scripting language, easily embedded into your apps.

Upvotes: 1

Related Questions