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();

See also ValueBase::iterator struct and Iterator class.

Members  

Type  

Functions  

Members detail  

const_iterator(const ValueBase::iterator &i)  

Create from non const iterator

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.

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