Re: How to bind subscript operator
David Osipyan <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
Looks like this is not supported yet. http://old.nabble.com/array-access-%22A-i-%22-and-luabind-td26478178.html On Mon, Apr 18, 2011 at 6:22 AM, he keding <[email protected]> wrote: > hi, all > How to bind subscript operator [] > For example > class Node > { > public: > int GetValue(); > ... > }; > class BindClass > { > public: > int operator [] (int index) > { > return m_nodes[index].GetValue(); > } > std::vector<Node> m_nodes; > }; > In lua, i want code this style: > -- bindClass is BindClass instance. > bindClass[2] = 10; > How to bind, I google but found no solution. > Thanks. > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > luabind-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/luabind-user > > -- Best regards David Osipyan ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev