The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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)
 
 MAKE_ENUM (STATUS,(NONE,"not created")(RUNNING,"running")(STOPPED,"stopped")) size_t size()
 
STATUS get_status (size_t idx)
 
std::string get_detailed_status (size_t idx)
 
std::string get_name (size_t idx)
 
bool any_running ()
 
size_t load_plugin (const std::string &name, const std::string &filename)
 
size_t add_plugin (const std::string &name, const std::string &prog)
 
void start_plugin (size_t idx)
 

Static Public Member Functions

static plugins_managerget ()
 

Private Attributes

boost::ptr_vector< pluginplugins_
 
boost::shared_ptr< bool > playing_
 
boost::scoped_ptr
< application_lua_kernel
kernel_
 

Detailed Description

Definition at line 37 of file manager.hpp.

Constructor & Destructor Documentation

plugins_manager::plugins_manager ( application_lua_kernel kernel)

Definition at line 47 of file manager.cpp.

References add_plugin(), and start_plugin().

plugins_manager::~plugins_manager ( )

Definition at line 59 of file manager.cpp.

Member Function Documentation

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

Definition at line 121 of file manager.cpp.

References plugin::is_file, plugin::name, plugins_, and plugin::source.

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

bool plugins_manager::any_running ( )

Definition at line 209 of file manager.cpp.

References get_status(), and i.

Referenced by gui::dialog::show().

plugins_manager * plugins_manager::get ( )
static
std::string plugins_manager::get_detailed_status ( size_t  idx)

Definition at line 86 of file manager.cpp.

References plugins_.

Referenced by game_launcher::init_lua_script().

lua_kernel_base * plugins_manager::get_kernel_base ( )

Definition at line 66 of file manager.cpp.

References kernel_.

Referenced by game_launcher::init_lua_script().

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

Definition at line 97 of file manager.cpp.

References plugins_.

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

plugins_manager::STATUS plugins_manager::get_status ( size_t  idx)

Definition at line 75 of file manager.cpp.

References compression::NONE, and plugins_.

Referenced by any_running(), and intf_describe_plugins().

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

Definition at line 134 of file manager.cpp.

References plugin::is_file, plugin::name, plugins_, and plugin::source.

plugins_manager::MAKE_ENUM ( STATUS  ,
(NONE,"not created")(RUNNING,"running")(STOPPED,"stopped")   
)
void plugins_manager::notify_event ( const std::string name,
const config data 
)
void plugins_manager::play_slice ( const plugins_context ctxt)

Definition at line 161 of file manager.cpp.

References DBG_PLG, playing_, and plugins_.

Referenced by plugins_context::play_slice().

void plugins_manager::start_plugin ( size_t  idx)

Definition at line 104 of file manager.cpp.

References DBG_PLG, kernel_, and plugins_.

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

Member Data Documentation

boost::scoped_ptr<application_lua_kernel> plugins_manager::kernel_
private

Definition at line 75 of file manager.hpp.

Referenced by get_kernel_base(), and start_plugin().

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

Definition at line 74 of file manager.hpp.

Referenced by play_slice().

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

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