ValueBase::const_iterator struct reference
[Base module]
Declaration
#include <QtLua/Value>
namespace QtLua {
class ValueBase {
struct const_iterator;
};
};
This struct is a member of the ValueBase class.
Description
This iterator class allow iteration through table like lua values directly from C++ code. Modification of Value object returned by ValueBase::const_iterator::value doesn't modify traversed container.
// code from examples/cpp/value/iterate.cc:40
// Iterate over lua table from C++ code
for (QtLua::Value::const_iterator i = table.begin(); i != table.end(); i++)
qDebug() << i.key().to_string_p()
<< i.value().to_string_p();
Members
Type
- typedef [...] iterator_category
Functions
- const_iterator(const ValueBase::iterator &i)
- const_iterator()
- Value key() const
- bool operator!=(const ValueBase::iterator_ &i) const
- Value operator*() const
- ValueBase::iterator_ & operator++()
- ValueBase::iterator_ operator++(int )
- bool operator==(const ValueBase::iterator_ &i) const
- Value value() const
Members detail
const_iterator(const ValueBase::iterator &i)
Create from non const iterator
Create a non uninitialized ValueBase::const_iterator.
Value operator*() const
See ValueBase::const_iterator::value function.
Value value() const
Get current entry value.