The current version's features are hard to classify as it's a binding helper and by definition it helps the C++ binding process along. It hides a lot of the script API specific stuff inside the template, allowing you to wrie a fairly simple wrapper class to handle the calling of functions and the getting/setting of properties. Each property can have a set/get method allowing you to specify read/write only properties with minimal fuss.
I'm looking to expand the system to handle the index operators (object[x]) as well as normal operators (+, -, /, *, etc) so the user can quickly add handling of these into their code with minimal effort. I've also been toying with the idea of throwing in some support for auto-casting the property 'set' calls. Most of the time, a C++ object will want a specific type and so it make sense to cast to this.
By way of example, here's a typical set method to set an int. GameMonkey will pass either an int or a float which needs converting for C++.
static bool setX( Alien *p, gmThread * a_thread, gmVariable * a_operands )
if ( a_operands.m_type == GM_INT )
p->x = (float) a_operands.m_value.m_int;
else if ( a_operands.m_type == GM_FLOAT )
p->x = a_operands.m_value.m_float;
If I introduce a typed system, I can change the method to make it simpler for binding.
static bool setX( Alien *p, gmThread * a_thread, gmVariable * a_operands, float *value )
p->x = value;
In this situation, a special 'set' handler will need writing to handle either the int, float or user type meaning that I can have one of 4 possible property calls (keeping the existing one for power-users and special cases and multiple values). The template code would have logic for dealing with the casting internally so the typical logic code is hidden away. I feel that this is necessary because most people will be dealing with single-value set calls and it's pretty annoying having to deal with the same cast on ints/floats. I'll have to think more about the actual implementation of this method (I can already see flaws here) but it sounds reasonable.
Incidentally, has anyone used GameMonkey at all? Would something like this be useful to you (in GM, SpiderMonkey or Lua?)