The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
ai::lua_ai_context Class Reference

Proxy table for the AI context. More...

#include <core.hpp>

Public Member Functions

 ~lua_ai_context ()
 
void update_state ()
 
void get_persistent_data (config &) const
 
void set_persistent_data (const config &)
 
void get_arguments (config &) const
 
void set_arguments (const config &)
 
void push_ai_table ()
 

Static Public Member Functions

static void init (lua_State *L)
 

Private Member Functions

 lua_ai_context (lua_State *l, int num, int side)
 

Static Private Member Functions

static lua_ai_contextcreate (lua_State *L, char const *code, engine_lua *engine)
 

Private Attributes

lua_StateL
 
int num_
 
int side_
 

Friends

class ::game_lua_kernel
 
class lua_ai_load
 

Detailed Description

Proxy table for the AI context.

Definition at line 35 of file core.hpp.

Constructor & Destructor Documentation

ai::lua_ai_context::lua_ai_context ( lua_State l,
int  num,
int  side 
)
inlineprivate

Definition at line 41 of file core.hpp.

Referenced by create().

ai::lua_ai_context::~lua_ai_context ( )

Member Function Documentation

lua_ai_context * ai::lua_ai_context::create ( lua_State L,
char const *  code,
ai::engine_lua engine 
)
staticprivate
void ai::lua_ai_context::get_arguments ( config cfg) const
void ai::lua_ai_context::get_persistent_data ( config cfg) const
void ai::lua_ai_context::init ( lua_State L)
static
void ai::lua_ai_context::push_ai_table ( )

Definition at line 134 of file core.cpp.

void ai::lua_ai_context::set_arguments ( const config cfg)
void ai::lua_ai_context::set_persistent_data ( const config cfg)
void ai::lua_ai_context::update_state ( )

Definition at line 1000 of file core.cpp.

References lua_getfield(), lua_pop, lua_setfield(), and luaW_pcall().

Friends And Related Function Documentation

friend class ::game_lua_kernel
friend

Definition at line 54 of file core.hpp.

friend class lua_ai_load
friend

Definition at line 55 of file core.hpp.

Member Data Documentation

lua_State* ai::lua_ai_context::L
private

Definition at line 38 of file core.hpp.

int ai::lua_ai_context::num_
private
int ai::lua_ai_context::side_
private

Definition at line 40 of file core.hpp.


The documentation for this class was generated from the following files: