The Battle for Wesnoth  1.19.5+dev
Classes | Macros | Functions
lua_kernel_base.hpp File Reference
#include <sstream>
#include <string>
#include <vector>
#include <functional>
#include <cstdint>
Include dependency graph for lua_kernel_base.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  lua_kernel_base
 
struct  lua_kernel_base::command_log
 Log implementation. More...
 
struct  game_config_tag
 
struct  lua_object_traits< game_config_tag >
 

Macros

#define GAME_CONFIG_GETTER(name, type, kernel_type)
 
#define GAME_CONFIG_SETTER(name, type, kernel_type)
 

Functions

std::vector< std::string > luaW_get_attributes (lua_State *L, int idx)
 This function does the actual work of grabbing all the attribute names. More...
 

Macro Definition Documentation

◆ GAME_CONFIG_GETTER

#define GAME_CONFIG_GETTER (   name,
  type,
  kernel_type 
)
Value:
LATTR_VALID(name, game_config_tag, k) { return dynamic_cast<kernel_type*>(&k.ref) != nullptr; } \
LATTR_GETTER(name, type, game_config_tag, k)
#define LATTR_VALID(name, obj_type, obj_name)

Definition at line 155 of file lua_kernel_base.hpp.

◆ GAME_CONFIG_SETTER

#define GAME_CONFIG_SETTER (   name,
  type,
  kernel_type 
)
Value:
LATTR_VALID(name, game_config_tag, k) { return dynamic_cast<kernel_type*>(&k.ref) != nullptr; } \
LATTR_SETTER(name, type, game_config_tag, k)

Definition at line 158 of file lua_kernel_base.hpp.

Function Documentation

◆ luaW_get_attributes()

std::vector<std::string> luaW_get_attributes ( lua_State *  L,
int  idx 
)

This function does the actual work of grabbing all the attribute names.

It's a separate function so that it can be used by tab-completion as well.

Definition at line 608 of file lua_kernel_base.cpp.

References dir_meta_helper(), impl_is_deprecated(), lua_push(), luaW_toboolean(), and ON_SCOPE_EXIT.

Referenced by luaW_Registry::dir(), lua_widget::impl_widget_dir(), and intf_object_dir().