Sign in to follow this  

Delayed calling of functions

This topic is 1107 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

I'm trying to create a Reflection API for our game for use both in C++, and in scripts.

What i want to be able to do is store parameters passed to a function, and at some unspecified time in the future, call a function that can receive those parameters, either the exact types or types that can be cast to from the original arguments.

It should also optionally be possible to call a function with a given name that supports the first N arguments passed, ignoring the rest.

 

So far i've created a class that takes input arguments and stores them. I know how to set the arguments for a function if the types are an exact match, but converting all the types is a major hassle.

 

I'm wondering if there is any way to invoke the Angelscript compiler to perform these conversion for me, if possible.

I know it's unlikely, but i just wanted to ask in case it was possible.

Knowing what to do to convert one value to another would be a big help.

Share this post


Link to post
Share on other sites

I suggest you take a look at how the dictionary add-on stores values and how they are then later retrieved. It may not be exactly the way that you want it, but I think you'll be able to figure out how to solve what you're trying to do by using it as an example.

Share this post


Link to post
Share on other sites

This topic is 1107 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this