#include <LuaValue.hpp>
Public Member Functions | |
| LuaValue () | |
Constructs a LuaValue with a nil value. | |
| LuaValue (bool b) | |
Constructs a LuaValue with boolean type and b value. | |
| LuaValue (float n) | |
Constructs a LuaValue with number type and n value. | |
| LuaValue (double n) | |
Constructs a LuaValue with number type and n value. | |
| LuaValue (long double n) | |
Constructs a LuaValue with number type and n value. | |
| LuaValue (short n) | |
Constructs a LuaValue with number type and n value. | |
| LuaValue (unsigned short n) | |
Constructs a LuaValue with number type and n value. | |
| LuaValue (int n) | |
Constructs a LuaValue with number type and n value. | |
| LuaValue (unsigned n) | |
Constructs a LuaValue with number type and n value. | |
| LuaValue (long n) | |
Constructs a LuaValue with number type and n value. | |
| LuaValue (unsigned long n) | |
Constructs a LuaValue with number type and n value. | |
| LuaValue (const std::string &s) | |
Constructs a LuaValue with string type and s value. | |
| LuaValue (const char *s) | |
Constructs a LuaValue with string type and s value. | |
| LuaValue (const LuaValueMap &t) | |
Constructs a LuaValue with table type and t value. | |
| LuaValue (lua_CFunction f) | |
Constructs a LuaValue with function type and f value. | |
| LuaValue (const LuaUserData &ud) | |
Constructs a LuaValue with "user data" type and ud value. | |
| LuaValue (const LuaValueList &v) | |
| const LuaValueList & | operator= (const LuaValueList &rhs) |
| int | type () const |
| std::string | typeName () const |
| lua_Number | asNumber () const |
| const std::string & | asString () const |
| bool | asBoolean () const |
| LuaValueMap | asTable () const |
| lua_CFunction | asFunction () const |
| const LuaUserData & | asUserData () const |
| LuaUserData & | asUserData () |
| bool | operator< (const LuaValue &rhs) const |
| bool | operator> (const LuaValue &rhs) const |
| bool | operator== (const LuaValue &rhs) const |
| bool | operator!= (const LuaValue &rhs) const |
| LuaValue & | operator[] (const LuaValue &key) |
| const LuaValue & | operator[] (const LuaValue &key) const |
Private Attributes | |
| boost::variant< NilType, lua_Number, std::string, bool, LuaValueMap, lua_CFunction, LuaUserData > | value_ |
Stores the value (and the type) stored in this LuaValue. | |
Classes | |
| class | NilType |
Almost dummy class; simply represents the type of nil. More... | |
LuaValue is a C++-side thing. There is absolutely no relationship between a LuaValue and a Lua state. This is particularly important for tables and userdata: in Lua, these things are garbage-collectible objects, and variables are just references to them. In Diluculum, a LuaValue represents the value (hence the name!). So, if a LuaValue holds a table, then it contains a collection of keys and values. Similarly, if it holds a userdata, it actually contains a block of memory with some data.
Definition at line 54 of file LuaValue.hpp.
|
|
Constructs a
Definition at line 58 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 61 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 66 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 71 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 76 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 81 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 86 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 91 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 96 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 101 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 106 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 111 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 116 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 121 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 126 of file LuaValue.hpp. |
|
|
Constructs a
Definition at line 131 of file LuaValue.hpp. |
|
|
Constructs a |
|
|
Return the value as a boolean.
|
|
|
Return the value as a function.
|
|
|
Return the value as a number.
|
|
|
Return the value as a string.
|
|
|
Returns the value as a table (
|
|
|
Return the value as a (full) user data.
|
|
|
Return the value as a
|
|
|
"Different" operator for
Definition at line 253 of file LuaValue.hpp. |
|
|
"Less than" operator for
|
|
|
Assigns a |
|
|
"Equal" operator for
|
|
|
"Greater than" operator for
|
|
|
Returns a
|
|
|
Returns a reference to a field of this
|
|
|
Returns one of the |
|
|
Returns the type of this
|
|
|
Stores the value (and the type) stored in this
Definition at line 277 of file LuaValue.hpp. |
1.4.6