Jump to content
  • Advertisement
Sign in to follow this  
Solokiller

Delayed calling of functions

This topic is 1323 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
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!