The Battle for Wesnoth  1.15.0+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::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

boost::ptr_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_, 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 plugin::is_file, plugin::name, name(), p, plugins_, and plugin::source.

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 i, and utf8::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_, gui2::NONE, plugins_, and utf8::size().

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().

◆ 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 plugin::is_file, plugin::name, name(), p, plugins_, and plugin::source.

◆ notify_event()

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

◆ 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 utf8::size().

Referenced by plugins_context::play_slice().

◆ 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 72 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 71 of file manager.hpp.

Referenced by play_slice().

◆ plugins_

boost::ptr_vector<plugin> plugins_manager::plugins_
private

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