Value class reference
[Base module]
Declaration
#include <QtLua/Value>
namespace QtLua {
class Value;
};
This class is a member of the QtLua namespace.
Description
This class exposes a lua value to C++ code. It provides conversion functions, cast operators, access operators and standard C++ iterators.
Each Value object store its associated lua value in the lua interpreter state registry table.
See also Qt/Lua types conversion section, Iterator class, ValueBase::iterator struct and ValueBase::const_iterator struct.
Members
Types
- enum Bool
- struct List
- enum Operation
- typedef [...] Operations
- enum ValueType
- struct const_iterator
- struct iterator
Functions
- Value()
- Value(const State *ls)
- Value(const Value &lv)
- Value(const State *ls, const Value &lv)
- Value(Value &&lv)
- Value(const State *ls, Value &&lv)
- Value(const State *ls, ValueBase::Bool n)
- Value(const State *ls, float n)
- Value(const State *ls, double n)
- Value(const State *ls, int n)
- Value(const State *ls, unsigned int n)
- Value(const State *ls, const String &str)
- Value(const State *ls, const QString &str)
- Value(const State *ls, const char *str)
- Value(const State *ls, const Ref<UserData> &ud)
- Value(const State *ls, UserData *ud)
- Value(const State *ls, QObject *obj)
- Value(const State *ls, const QVariant &qv)
- Value(State *ls, QObject *obj, bool delete_, bool reparent)
- template Value(const State *ls, const QList<X> &list)
- template Value(const State *ls, QList<X> &list)
- template Value(const State *ls, const QVector<X> &vector)
- template Value(const State *ls, QVector<X> &vector)
- template Value(const State *ls, unsigned int size, const X *array)
- template Value(const State *ls, const QHash<Key, Val> &hash)
- template Value(const State *ls, QHash<Key, Val> &hash)
- template Value(const State *ls, const QMap<Key, Val> &map)
- template Value(const State *ls, QMap<Key, Val> &map)
- ~Value()
- Value at(const Value &key) const
- template Value at(const T &key) const
- ValueBase::iterator begin()
- ValueBase::const_iterator begin() const
- ValueBase::List call(const ValueBase::List &args) const
- ValueBase::const_iterator cbegin() const
- ValueBase::const_iterator cend() const
- bool connect(QObject *obj, const char *signal)
- bool disconnect(QObject *obj, const char *signal)
- ValueBase::iterator end()
- ValueBase::const_iterator end() const
- State * get_state() const
- bool is_dead() const
- bool is_empty() const
- bool is_nil() const
- int len() const
- Ref<Iterator> new_iterator() const
- operator Bool() const
- template operator QHash<Key,Val>() const
- template operator QList<X>() const
- template operator QMap<Key,Val>() const
- operator QString() const
- operator QVariant() const
- template operator QVector<X>() const
- template operator Ref<X>() const
- operator String() const
- operator Value() const
- operator double() const
- operator float() const
- operator signed char() const
- operator signed int() const
- operator signed long() const
- operator signed short() const
- operator unsigned char() const
- operator unsigned int() const
- operator unsigned long() const
- operator unsigned short() const
- ValueBase::List operator()() const
- ValueBase::List operator()(const Value &arg1) const
- ValueBase::List operator()(const Value &arg1, const Value &arg2) const
- ValueBase::List operator()(const Value &arg1, const Value &arg2, const Value &arg3) const
- ValueBase::List operator()(const Value &arg1, const Value &arg2, const Value &arg3, const Value &arg4) const
- ValueBase::List operator()(const Value &arg1, const Value &arg2, const Value &arg3, const Value &arg4, const Value &arg5) const
- ValueBase::List operator()(const Value &arg1, const Value &arg2, const Value &arg3, const Value &arg4, const Value &arg5, const Value &arg6) const
- bool operator<(const Value &lv) const
- Value & operator=(const Value &lv)
- Value & operator=(Value &&lv)
- Value & operator=(ValueBase::Bool n)
- Value & operator=(double n)
- Value & operator=(float n)
- Value & operator=(int n)
- Value & operator=(unsigned int n)
- Value & operator=(const String &str)
- Value & operator=(const QString &str)
- Value & operator=(const char *str)
- Value & operator=(const Ref<UserData> &ud)
- Value & operator=(UserData *ud)
- Value & operator=(QObject *obj)
- Value & operator=(const QVariant &qv)
- Value & operator=(double n) &&
- Value & operator=(float n) &&
- Value & operator=(int n) &&
- Value & operator=(unsigned int n) &&
- Value & operator=(const String &str) &&
- Value & operator=(const QString &str) &&
- Value & operator=(const char *str) &&
- Value & operator=(const Ref<UserData> &ud) &&
- Value & operator=(UserData *ud) &&
- Value & operator=(QObject *obj) &&
- Value & operator=(const QVariant &qv) &&
- bool operator==(const Value &lv) const
- bool operator==(const String &str) const
- bool operator==(const char *str) const
- bool operator==(double n) const
- Value operator[](const Value &key) const
- template Value operator[](const T &key) const
- ValueRef operator[](const Value &key)
- template ValueRef operator[](const T &key)
- ValueBase::List start(const Value &main, const ValueBase::List &args) const
- bool support(ValueBase::Operation c) const
- void table_shift(int pos, int count, const Value &init, int len = [...])
- void table_shift(int pos, int count, int len = [...])
- ValueBase::Bool to_boolean() const
- QByteArray to_bytecode() const
- template X * to_class_cast() const
- template X * to_class_cast_null() const
- int to_integer() const
- double to_number() const
- template QHash<Key, Val> to_qhash() const
- template QList<X> to_qlist() const
- template QMap<Key, Val> to_qmap() const
- QObject * to_qobject() const
- template X * to_qobject_cast() const
- QString to_qstring() const
- QVariant to_qvariant() const
- QVariant to_qvariant(int qt_type) const
- template QVector<X> to_qvector() const
- String to_string() const
- String to_string_p(bool quote_string = [...]) const
- Ref<UserData> to_userdata() const
- template Ref<X> to_userdata_cast() const
- template Ref<X> to_userdata_cast_null() const
- ValueBase::ValueType type() const
- String type_name() const
- String type_name_u() const
Static functions
- static Value new_global_env(const State *ls)
- static Value new_table(const State *ls)
- static Value new_thread(const State *ls, const Value &main)
- static String type_name(ValueBase::ValueType t)
Members detail
Create a lua value object with no associated State
Value(const State *ls)
Create a "nil" lua value.
Value(const Value &lv)
Create a lua value copy.
Create a lua value copy.
Value(Value &&lv)
Create a lua value copy.
Create a lua value copy.
Create a lua value.
Value(const State *ls, float n)
Create a number lua value.
Value(const State *ls, double n)
Create a number lua value.
Value(const State *ls, int n)
Create a number lua value.
Value(const State *ls, unsigned int n)
Create a number lua value.
Create a string lua value.
Create a string lua value.
Value(const State *ls, const char *str)
Create a string lua value.
Create a lua userdata value.
Create a lua userdata value.
Create a wrapped QObject lua value.
See also QObject wrapping section and Value::Value function.
Create a lua value from a QVariant object.
See also Qt/Lua types conversion section.
Create a QObject lua value and update associated wrapper ownership flags for this QObject.
See also QObject wrapping section.
Create a lua table indexed from 1 with elements from a QList.
See also Qt/Lua types conversion section.
Create a lua table indexed from 1 with elements from a QList.
See also Qt/Lua types conversion section.
Create a lua table indexed from 1 with elements from a QVector.
See also Qt/Lua types conversion section.
Create a lua table indexed from 1 with elements from a QVector.
See also Qt/Lua types conversion section.
template <typename X> Value(const State *ls, unsigned int size, const X *array)
Create a lua table indexed from 1 with elements from a C array.
See also Qt/Lua types conversion section.
Create a lua table with elements from QHash.
See also Qt/Lua types conversion section.
Create a lua table with elements from QHash.
See also Qt/Lua types conversion section.
Create a lua table with elements from QMap.
See also Qt/Lua types conversion section.
Create a lua table with elements from QMap.
See also Qt/Lua types conversion section.
Remove lua value from lua state registry.
Create a new lua global environment value
Create a new lua table value
Create a new coroutine value with given entry point lua function.
Copy a lua value.
No documentation available
Assign a boolean to lua value.
Value & operator=(double n)
Assign a number to lua value.
Value & operator=(float n)
Assign a number to lua value.
Value & operator=(int n)
Assign a number to lua value.
Value & operator=(unsigned int n)
Assign a number to lua value.
Assign a string to lua value.
Assign a string to lua value.
Value & operator=(const char *str)
Assign a string to lua value.
Assign a userdata to lua value. The value will hold a Ref reference to the UserData object which will be dropped later by the lua garbage collector.
No documentation available
Assign a QObject to lua value.
See also QObject wrapping section.
Convert a QVariant to lua value.
See also Qt/Lua types conversion section.
Value & operator=(double n) &&
This functions is not implemented, its declaration prevents a common pitfall of assignment to temporary Value instead of ValueRef object.
Value & operator=(float n) &&
This functions is not implemented, its declaration prevents a common pitfall of assignment to temporary Value instead of ValueRef object.
Value & operator=(int n) &&
This functions is not implemented, its declaration prevents a common pitfall of assignment to temporary Value instead of ValueRef object.
Value & operator=(unsigned int n) &&
This functions is not implemented, its declaration prevents a common pitfall of assignment to temporary Value instead of ValueRef object.
This functions is not implemented, its declaration prevents a common pitfall of assignment to temporary Value instead of ValueRef object.
This functions is not implemented, its declaration prevents a common pitfall of assignment to temporary Value instead of ValueRef object.
Value & operator=(const char *str) &&
This functions is not implemented, its declaration prevents a common pitfall of assignment to temporary Value instead of ValueRef object.
This functions is not implemented, its declaration prevents a common pitfall of assignment to temporary Value instead of ValueRef object.
This functions is not implemented, its declaration prevents a common pitfall of assignment to temporary Value instead of ValueRef object.