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
- typedef [...] iterator_category
Functions
- iterator()
- Value key() const
- bool operator!=(const ValueBase::iterator_ &i) const
- ValueRef operator*()
- ValueBase::iterator_ & operator++()
- ValueBase::iterator_ operator++(int )
- bool operator==(const ValueBase::iterator_ &i) const
- ValueRef value()
Members detail
Create an uninitialized ValueBase::iterator.
ValueRef operator*()
See ValueBase::iterator::value function.
ValueRef value()
Get modifiable reference to current entry value.