#include "config.hpp"
#include "map/location.hpp"
#include "variable_info.hpp"
#include <string>
#include <string_view>
#include <vector>
Go to the source code of this file.
Classes | |
struct | luaW_Registry |
Holds a lookup table for members of one type of object. More... | |
struct | lua_getter< object_type, value_type > |
struct | lua_setter< object_type, value_type > |
struct | lua_validator< object_type > |
Macros | |
#define | LATTR_MAKE_UNIQUE_ID(base, id, obj_name) BOOST_PP_CAT(BOOST_PP_CAT(base, id), BOOST_PP_CAT(_for_, obj_name)) |
#define | LATTR_GETTER5(name, value_type, obj_type, obj_name, id) |
#define | LATTR_SETTER5(name, value_type, obj_type, obj_name, id) |
#define | LATTR_VALID5(name, obj_type, obj_name, id) |
#define | LATTR_GETTER(name, value_type, obj_type, obj_name) LATTR_GETTER5(name, value_type, obj_type, obj_name, __LINE__) |
#define | LATTR_SETTER(name, value_type, obj_type, obj_name) LATTR_SETTER5(name, value_type, obj_type, obj_name, __LINE__) |
#define | LATTR_VALID(name, obj_type, obj_name) LATTR_VALID5(name, obj_type, obj_name, __LINE__) |
Enumerations | |
enum class | lua_attrfunc_type { getter , setter , validator } |
Functions | |
template<typename T > | |
std::decay_t< T > | lua_check (lua_State *L, int n) |
template<typename object_type , typename value_type , typename action_type , lua_attrfunc_type type> | |
void | register_lua_attribute (const char *name) |
#define LATTR_GETTER | ( | name, | |
value_type, | |||
obj_type, | |||
obj_name | |||
) | LATTR_GETTER5(name, value_type, obj_type, obj_name, __LINE__) |
name | string attribute name |
value_type | the type of the attribute, for example int or std::string |
obj_type | the type of the object, for example lua_unit |
obj_name | a name for the variable that will hold the object |
Definition at line 173 of file lua_attributes.hpp.
#define LATTR_GETTER5 | ( | name, | |
value_type, | |||
obj_type, | |||
obj_name, | |||
id | |||
) |
Definition at line 122 of file lua_attributes.hpp.
#define LATTR_MAKE_UNIQUE_ID | ( | base, | |
id, | |||
obj_name | |||
) | BOOST_PP_CAT(BOOST_PP_CAT(base, id), BOOST_PP_CAT(_for_, obj_name)) |
Definition at line 120 of file lua_attributes.hpp.
#define LATTR_SETTER | ( | name, | |
value_type, | |||
obj_type, | |||
obj_name | |||
) | LATTR_SETTER5(name, value_type, obj_type, obj_name, __LINE__) |
Definition at line 175 of file lua_attributes.hpp.
#define LATTR_SETTER5 | ( | name, | |
value_type, | |||
obj_type, | |||
obj_name, | |||
id | |||
) |
Definition at line 137 of file lua_attributes.hpp.
#define LATTR_VALID | ( | name, | |
obj_type, | |||
obj_name | |||
) | LATTR_VALID5(name, obj_type, obj_name, __LINE__) |
Definition at line 177 of file lua_attributes.hpp.
#define LATTR_VALID5 | ( | name, | |
obj_type, | |||
obj_name, | |||
id | |||
) |
Definition at line 152 of file lua_attributes.hpp.
|
strong |
Enumerator | |
---|---|
getter | |
setter | |
validator |
Definition at line 63 of file lua_attributes.hpp.
std::decay_t<T> lua_check | ( | lua_State * | L, |
int | n | ||
) |
Definition at line 411 of file push_check.hpp.
References n.
Referenced by impl_source_set(), and read_event_name().
void register_lua_attribute | ( | const char * | name | ) |
Definition at line 89 of file lua_attributes.hpp.
References cursor::get(), getter, luaW_Registry::lookup, lua_push(), setter, and validator.