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.
This struct is declared in QtLua/qtluavaluebase.hh source file, line 137.
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
Inherited members
- 9 members inherited from ValueBase::iterator_
Functions
- const_iterator(const ValueBase::iterator &i)
- const_iterator()
- const_iterator(const Ref<Iterator> &i)
- Value operator*() const
- Value value() const
Members detail
const_iterator(const ValueBase::iterator &i)
This constructor is declared in QtLua/qtluavaluebase.hh source file, line 141.
Create from non const iterator
This constructor is declared in QtLua/qtluavaluebase.hh source file, line 143.
Create a non uninitialized ValueBase::const_iterator.
This constructor is for internal use only.
This constructor is declared in QtLua/qtluavaluebase.hh source file, line 139.
Value operator*() const
This function is declared in QtLua/qtluavaluebase.hh source file, line 147.
See also ValueBase::const_iterator::value function.
Value value() const
This function is declared in QtLua/qtluavaluebase.hh source file, line 145.
Get current entry value.