#include <soundsource.hpp>
Public Member Functions | |
manager (const display &disp) | |
~manager () | |
void | handle_generic_event (const std::string &event_name) |
void | add (const sourcespec &source) |
void | remove (const std::string &id) |
config | get (const std::string &id) |
void | update () |
void | update_positions () |
void | write_sourcespecs (config &cfg) const |
Serializes information into cfg as new children of key "sound_source", appended to existing content. More... | |
Public Member Functions inherited from events::observer | |
virtual | ~observer () |
Private Types | |
typedef std::map< std::string, positional_source * > | positional_source_map |
typedef positional_source_map::iterator | positional_source_iterator |
typedef positional_source_map::const_iterator | positional_source_const_iterator |
Private Attributes | |
positional_source_map | sources_ |
const display & | disp_ |
Definition at line 76 of file soundsource.hpp.
|
private |
Definition at line 81 of file soundsource.hpp.
|
private |
Definition at line 80 of file soundsource.hpp.
|
private |
Definition at line 79 of file soundsource.hpp.
soundsource::manager::manager | ( | const display & | disp | ) |
Definition at line 33 of file soundsource.cpp.
References events::generic_event::attach_handler(), disp_, display::scroll_event(), and update_positions().
soundsource::manager::~manager | ( | ) |
Definition at line 42 of file soundsource.cpp.
References sources_.
void soundsource::manager::add | ( | const sourcespec & | source | ) |
Definition at line 57 of file soundsource.cpp.
References soundsource::sourcespec::id(), and sources_.
Referenced by game_lua_kernel::intf_add_sound_source().
config soundsource::manager::get | ( | const std::string & | id | ) |
Definition at line 69 of file soundsource.cpp.
References sources_.
Referenced by game_lua_kernel::intf_get_sound_source().
|
virtual |
Implements events::observer.
Definition at line 51 of file soundsource.cpp.
References update_positions().
void soundsource::manager::remove | ( | const std::string & | id | ) |
Definition at line 79 of file soundsource.cpp.
References sources_.
Referenced by game_lua_kernel::intf_remove_sound_source().
void soundsource::manager::update | ( | ) |
Definition at line 91 of file soundsource.cpp.
void soundsource::manager::update_positions | ( | ) |
Definition at line 100 of file soundsource.cpp.
References disp_, and sources_.
Referenced by handle_generic_event(), and manager().
Serializes information into cfg as new children of key "sound_source", appended to existing content.
Definition at line 109 of file soundsource.cpp.
References config::add_child(), i, and sources_.
|
private |
Definition at line 84 of file soundsource.hpp.
Referenced by manager(), update(), and update_positions().
|
private |
Definition at line 83 of file soundsource.hpp.
Referenced by add(), get(), remove(), update(), update_positions(), write_sourcespecs(), and ~manager().