• Advertisement
Sign in to follow this  

luabind and modules

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

Hello I have a user-customizable map which looks like that: std::map<std::string, std::vector<std::string>> mapkey1 -> value1 value2 value3 etc.. mapkey2 -> value.. Now I want to add c++ functions to luabind in a loop.. Is that possible? For instance: luabind::module(state) [ //here I'd like to make some kind of loop that would add mapkey1 function that would call somefunction("mapkey1); .. ]; In case that is not possible, is there any way to define globals in lua so that some function is called instead of passing a global? For instance: luabind::globals(state)["mapkey1"] = call_some_function_and_return(); Thanks for help Best regards

Share this post


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

  • Advertisement