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

#include <soundsource.hpp>

Inheritance diagram for soundsource::manager:
Inheritance graph

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 displaydisp_
 

Detailed Description

Definition at line 76 of file soundsource.hpp.

Member Typedef Documentation

typedef positional_source_map::const_iterator soundsource::manager::positional_source_const_iterator
private

Definition at line 81 of file soundsource.hpp.

typedef positional_source_map::iterator soundsource::manager::positional_source_iterator
private

Definition at line 80 of file soundsource.hpp.

Definition at line 79 of file soundsource.hpp.

Constructor & Destructor Documentation

soundsource::manager::manager ( const display disp)
soundsource::manager::~manager ( )

Definition at line 42 of file soundsource.cpp.

References sources_.

Member Function Documentation

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

void soundsource::manager::handle_generic_event ( const std::string event_name)
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.

References disp_, and sources_.

void soundsource::manager::update_positions ( )

Definition at line 100 of file soundsource.cpp.

References disp_, and sources_.

Referenced by handle_generic_event(), and manager().

void soundsource::manager::write_sourcespecs ( config cfg) const

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_.

Member Data Documentation

const display& soundsource::manager::disp_
private

Definition at line 84 of file soundsource.hpp.

Referenced by manager(), update(), and update_positions().

positional_source_map soundsource::manager::sources_
private

Definition at line 83 of file soundsource.hpp.

Referenced by add(), get(), remove(), update(), update_positions(), write_sourcespecs(), and ~manager().


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