The Battle for Wesnoth  1.19.5+dev
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
plugins_manager Class Reference

#include <manager.hpp>

Classes

struct  event
 

Public Member Functions

 plugins_manager (application_lua_kernel *)
 
 ~plugins_manager ()
 
lua_kernel_baseget_kernel_base ()
 
void play_slice (const plugins_context &)
 
void notify_event (const std::string &name, const config &data)
 
std::size_t size ()
 
plugin_manager_status::type get_status (std::size_t idx)
 
std::string get_detailed_status (std::size_t idx)
 
std::string get_name (std::size_t idx)
 
bool any_running ()
 
std::size_t load_plugin (const std::string &name, const std::string &filename)
 
std::size_t add_plugin (const std::string &name, const std::string &prog)
 
void start_plugin (std::size_t idx)
 

Static Public Member Functions

static plugins_managerget ()
 

Private Attributes

std::vector< pluginplugins_
 
std::shared_ptr< bool > playing_
 
std::unique_ptr< application_lua_kernelkernel_
 

Detailed Description

Definition at line 34 of file manager.hpp.

Constructor & Destructor Documentation

◆ plugins_manager()

plugins_manager::plugins_manager ( application_lua_kernel kernel)

Definition at line 43 of file manager.cpp.

References add_plugin(), kernel_, singleton, and start_plugin().

◆ ~plugins_manager()

plugins_manager::~plugins_manager ( )

Definition at line 56 of file manager.cpp.

Member Function Documentation

◆ add_plugin()

std::size_t plugins_manager::add_plugin ( const std::string &  name,
const std::string &  prog 
)

Definition at line 118 of file manager.cpp.

References p, and plugins_.

Referenced by game_launcher::init_lua_script(), and plugins_manager().

◆ any_running()

bool plugins_manager::any_running ( )

Definition at line 206 of file manager.cpp.

References get_status(), i, and size().

Referenced by gui2::dialogs::modal_dialog::show().

◆ get()

plugins_manager * plugins_manager::get ( )
static

◆ get_detailed_status()

std::string plugins_manager::get_detailed_status ( std::size_t  idx)

Definition at line 83 of file manager.cpp.

References plugins_.

Referenced by game_launcher::init_lua_script().

◆ get_kernel_base()

lua_kernel_base * plugins_manager::get_kernel_base ( )

Definition at line 63 of file manager.cpp.

References kernel_.

Referenced by game_launcher::init_lua_script().

◆ get_name()

std::string plugins_manager::get_name ( std::size_t  idx)

Definition at line 94 of file manager.cpp.

References plugins_.

Referenced by game_launcher::init_lua_script(), and intf_describe_plugins().

◆ get_status()

plugin_manager_status::type plugins_manager::get_status ( std::size_t  idx)

Definition at line 72 of file manager.cpp.

References plugins_.

Referenced by any_running().

◆ load_plugin()

std::size_t plugins_manager::load_plugin ( const std::string &  name,
const std::string &  filename 
)

Definition at line 131 of file manager.cpp.

References filename, p, and plugins_.

◆ notify_event()

void plugins_manager::notify_event ( const std::string &  name,
const config data 
)

Definition at line 144 of file manager.cpp.

References data, plugins_, and size().

Referenced by events::menu_handler::add_chat_message(), and gui2::chatbox::process_message().

◆ play_slice()

void plugins_manager::play_slice ( const plugins_context ctxt)

Definition at line 158 of file manager.cpp.

References DBG_PLG, playing_, plugins_, and size().

Referenced by plugins_context::play_slice().

◆ size()

std::size_t plugins_manager::size ( )

◆ start_plugin()

void plugins_manager::start_plugin ( std::size_t  idx)

Definition at line 101 of file manager.cpp.

References DBG_PLG, kernel_, and plugins_.

Referenced by game_launcher::init_lua_script(), and plugins_manager().

Member Data Documentation

◆ kernel_

std::unique_ptr<application_lua_kernel> plugins_manager::kernel_
private

Definition at line 67 of file manager.hpp.

Referenced by get_kernel_base(), plugins_manager(), and start_plugin().

◆ playing_

std::shared_ptr<bool> plugins_manager::playing_
private

Definition at line 66 of file manager.hpp.

Referenced by play_slice().

◆ plugins_

std::vector<plugin> plugins_manager::plugins_
private

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