making changes to stl collections

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

making changes to stl collections

Matthew Armstrong
luabind has a nice mechanism for iterating over stl collections.

(from the documentation)

struct X
{
std::vector<std::string> names;
};

...

module(L)
[
class_<A>("A")
.def_readwrite("names", &X::names, return_stl_iterator)
];

...

> a = A()
> for name in a.names do
> print(name)
> end

Is there any way of making changes to the vector?  Or is there another way of accomplishing the same thing?

thanks

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user