ValueBase::iterator struct reference
[Base module]

Declaration  

#include <QtLua/Value>

namespace QtLua {
class ValueBase {
struct iterator;
};
};

This struct is a member of the ValueBase class.

Description  

This iterator class allows iteration through table like lua values directly from C++ code. Assignation of ValueRef object returned by ValueBase::iterator::value modify traversed container.

// code from examples/cpp/value/iterate.cc:56

// Modify lua table from C++ code
for (QtLua::Value::iterator i = table.begin(); i != table.end(); i++)
i.value() = QtLua::Value(&state, "foo");

See also ValueBase::const_iterator struct and Iterator class.

Members  

Type  

Functions  

Members detail  

iterator()  

Create an uninitialized ValueBase::iterator.

ValueRef operator*()  

See ValueBase::iterator::value function.

ValueRef value()  

Get modifiable reference to current entry value.

Valid XHTML 1.0 StrictGenerated by diaxen on Sat Mar 30 15:29:55 2013 using MkDoc