NuriaProject Framework
0.1
The NuriaProject Framework
|
Stores a value from LUA. More...
#include <luavalue.hpp>
Public Types | |
enum | Type { Nil = 0, Boolean = 1, LightUserData = 2, Number = 3, String = 4, Table = 5, Function = 6, UserData = 7, Thread = 8 } |
Public Member Functions | |
LuaValue () | |
LuaValue (const LuaValue &other) | |
LuaValue (const LuaObject &object) | |
LuaValue (LuaRuntime *runtime, const QVariant &variant) | |
~LuaValue () | |
bool | isValid () const |
LuaObject | object () const |
LuaValue & | operator= (const LuaValue &other) |
LuaRuntime * | runtime () const |
QVariant | toVariant () const |
Type | type () const |
Static Public Member Functions | |
static LuaValue | fromStack (LuaRuntime *runtime, int idx) |
static Type | qtTypeToLua (int type) |
Friends | |
class | LuaMetaObject |
class | LuaMetaObjectWrapper |
class | LuaObject |
class | LuaRuntime |
class | LuaStackUtils |
Stores a value from LUA.
LUA types.
Nuria::LuaValue::LuaValue | ( | ) |
Constructs a invalid instance.
Nuria::LuaValue::LuaValue | ( | const LuaValue & | other | ) |
Copy constructor.
Nuria::LuaValue::LuaValue | ( | LuaRuntime * | runtime, |
const QVariant & | variant | ||
) |
Constructs a LuaValue out of a QVariant.
Nuria::LuaValue::~LuaValue | ( | ) |
Destructor.
|
static |
Constructs a instance from the value at stack idx of runtime.
bool Nuria::LuaValue::isValid | ( | ) | const |
Returns true
if this instance is valid.
LuaObject Nuria::LuaValue::object | ( | ) | const |
Returns the LuaObject if this value is a LUA user-data pointing to a type with a Nuria::MetaObject. If this isn't an object, the returned instance is invalid.
|
static |
Returns the LUA type that'd be used to represent type. If there's no known way to store type in LUA, Nil
is returned.
LuaRuntime* Nuria::LuaValue::runtime | ( | ) | const |
Returns the associated LUA runtime.
QVariant Nuria::LuaValue::toVariant | ( | ) | const |
Converts the value into a QVariant.
Type Nuria::LuaValue::type | ( | ) | const |
Returns the LUA type of this instance.