Registering object properties

Class member variables can be registered so that they can be directly accessed by the script without the need for any method calls.

struct MyStruct
{
  int a;
};

r = engine->RegisterObjectProperty("mytype", "int a", offsetof(MyStruct,a)); assert( r >= 0 );

offsetof() is a macro declared in stddef.h header file.


Generated on Mon Mar 30 22:13:56 2009 for AngelScript by  doxygen 1.5.6