• Advertisement
Sign in to follow this  

ToLua++, vectors, and lists

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

Does ToLua++ support std::vectors and lists, so I can do stuff like this?:

C++:
class Entity
{
std::list<Entity*> kids
};

Lua:
local child
for child in entity.kids do
--do stuff
end

Share this post


Link to post
Share on other sites
Advertisement
What is the reason you want to make a copy of the std container in Lua? Is the boundary jumping causing a problem when you implement a Lua iterator for the container?

Share this post


Link to post
Share on other sites
I haven't looked that closely at it yet, actually, I just came across a page that claims to have a solution. I don't know how to make a Lua iterator for a container yet, but that would certainly be preferable.

Share this post


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

  • Advertisement