I looked at the CAMP page and its tutorials, but I still don't know how it can ease things, I might need a concrete example of application, an example with CAMP to bind a class to Lua or in a simplistic GUI editor, or to store objects in binary files for example. That may be something to be added on the CAMP wiki tutorials.
We're currently working on adding more examples to the wiki
But for what you're talking about, which are real-life examples, we'll even write the corresponding generic modules, so that users can directly use them without writing a single line of Python / Lua / XML / GUI / whatever code.
What would make someone opt by CAMP instead of luabind?
Using Luabind would be very similar to using CAMP, but then what? You have a nice binding of all your C++ types so that you can use them in Lua, but
nowhere else. If you want to write a Python binding you will have to duplicate the exact same code with boost.python, and do this step over and over for each module that you write.
Declaring a meta-class with its functions and properties is a generic step, it shouldn't be tied to a script language or whetever. That's what CAMP allows. "Bind once, use everywhere".
Or to use CAMP to modify objects in a level editor instead of doing the same using the classes themselves?
This is the other side of the problem. You write some code that allows you to edit objects of class X in an editor, fine. But then you want to edit objects of class Y in the same kind of editor, so what do you do? You have to write the same code, again and again for every class that you want to be able to edit.
Using CAMP, you write the code once using the CAMP abstraction, and badaboum it works for all your classes.
In other words:
Without CAMP- You say "this class is named X in Lua, it contains ... properties and ... functions in Lua"
- Then you use these declarations in Lua
- You say "this class is named X in Python, it contains ... properties and ... functions in Python"
- Then you use these declarations in Python
- You say "this class is named X in XML, it contains ... properties and ... functions in XML"
- Then you use these declarations in XML
With CAMP- You say "this class is named X, it contains ... properties and ... functions"
- Then you use these common declarations in Lua, Python, XML, etc.