• Advertisement
Sign in to follow this  

New Script Binder

This topic is 4882 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here is a WIP version of a script binder I put together in a rush. http://www.xl3d.com/angelscript/asSourceParser.zip It supports nested class inheritance, and automatic updates of your interfaces. Run the included project and check the generated markup.cpp for the generated include file. Its not really fully developed right now, but I find its a heck of a lot easier to get your stuff imported with it. With just a few paste operations, you can export whole classes as well as their base classes without any extra work. Give it a go, and let me know what you think. Read the readme.txt for a brief description. I think its pretty flexible, so please try it with your classes and let me know how it goes. Leave out constructors, destructors and operators for now. I haven't implemented those yet (any help on how to register them automatically would be appreciated). One question on the biggest problem I ran into however... How does one get around having multiple functions of the same name in a class being declared? Right now I am just commenting out multiple names when they occur. For ex: class test { void GetPoint( int &x, int &y ); void GetPoint( float&x, float &y ); } The way I am using righ tnow won't allow me to declare those procedures because it doesn't know which one to use.

Share this post


Link to post
Share on other sites
Advertisement
For the overloaded functions you can use the macro asMETHODPR(class, method, parameters, returntype), e.g:

asMETHODPR(test,GetPoint,(int&x, int&y),void)


The constructors/destructors can be implemented with simple wrapper functions.

I know it is an early version, but I would like to upload it to my site, with a link to your page where readers can find the latest version. Is that ok with you?

Share this post


Link to post
Share on other sites
Thats fine with me, do with it as you please for all I care. I'll post here when the newer version is updated. It has support for typedefs and enumerations. I can almost automate the OpenGL header now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement