How to bind subscript operator
he keding <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
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