Sound source info class. More...
#include <soundsource.hpp>

Public Member Functions | |
| sourcespec (const std::string &id, const std::string &files, int min_delay, int chance) | |
| Parameter-list constructor. | |
| sourcespec (const config &cfg) | |
| WML constructor. | |
| void | write (config &cfg) const |
| Serializes information into cfg as a new (appended) child of key "sound_source". | |
| int | loops () const |
| void | set_loops (int value) |
| bool | check_fogged () const |
| bool | check_shrouded () const |
| void | set_check_fogged (bool value) |
| void | set_check_shrouded (bool value) |
| const std::vector< map_location > & | get_locations () const |
| int | full_range () const |
| void | set_full_range (int value) |
| int | fade_range () const |
| void | set_fade_range (int value) |
| int | minimum_delay () const |
| void | set_minimum_delay (int value) |
| int | chance () const |
| void | set_chance (int value) |
| const std::string & | id () const |
| const std::string & | files () const |
Private Attributes | |
| const std::string | id_ |
| const std::string | files_ |
| int | min_delay_ |
| int | chance_ |
| int | loops_ |
| int | range_ |
| int | faderange_ |
| bool | check_fogged_ |
| bool | check_shrouded_ |
| std::vector< map_location > | locations_ |
Sound source info class.
Encapsulates sound source parameters, so that they're easier to pass around/extend/read.
Definition at line 116 of file soundsource.hpp.
| soundsource::sourcespec::sourcespec | ( | const std::string & | id, | |
| const std::string & | files, | |||
| int | min_delay, | |||
| int | chance | |||
| ) | [inline] |
Parameter-list constructor.
Definition at line 134 of file soundsource.hpp.
| soundsource::sourcespec::sourcespec | ( | const config & | cfg | ) |
WML constructor.
Definition at line 233 of file soundsource.cpp.
References locations_, and read_locations().

| int soundsource::sourcespec::chance | ( | ) | const [inline] |
Definition at line 195 of file soundsource.hpp.
References chance_.
| bool soundsource::sourcespec::check_fogged | ( | ) | const [inline] |
Definition at line 162 of file soundsource.hpp.
References check_fogged_.
| bool soundsource::sourcespec::check_shrouded | ( | ) | const [inline] |
Definition at line 163 of file soundsource.hpp.
References check_shrouded_.
| int soundsource::sourcespec::fade_range | ( | ) | const [inline] |
Definition at line 183 of file soundsource.hpp.
References faderange_.
| const std::string& soundsource::sourcespec::files | ( | ) | const [inline] |
Definition at line 203 of file soundsource.hpp.
References files_.
| int soundsource::sourcespec::full_range | ( | ) | const [inline] |
Definition at line 177 of file soundsource.hpp.
References range_.
| const std::vector<map_location>& soundsource::sourcespec::get_locations | ( | ) | const [inline] |
Definition at line 173 of file soundsource.hpp.
References locations_.
| const std::string& soundsource::sourcespec::id | ( | ) | const [inline] |
Definition at line 201 of file soundsource.hpp.
References id_.
Referenced by soundsource::manager::add().

| int soundsource::sourcespec::loops | ( | ) | const [inline] |
Definition at line 156 of file soundsource.hpp.
References loops_.
| int soundsource::sourcespec::minimum_delay | ( | ) | const [inline] |
Definition at line 189 of file soundsource.hpp.
References min_delay_.
| void soundsource::sourcespec::set_chance | ( | int | value | ) | [inline] |
Definition at line 197 of file soundsource.hpp.
References chance_.
| void soundsource::sourcespec::set_check_fogged | ( | bool | value | ) | [inline] |
Definition at line 165 of file soundsource.hpp.
References check_fogged_.
| void soundsource::sourcespec::set_check_shrouded | ( | bool | value | ) | [inline] |
Definition at line 169 of file soundsource.hpp.
References check_shrouded_.
| void soundsource::sourcespec::set_fade_range | ( | int | value | ) | [inline] |
Definition at line 185 of file soundsource.hpp.
References faderange_.
| void soundsource::sourcespec::set_full_range | ( | int | value | ) | [inline] |
Definition at line 179 of file soundsource.hpp.
References range_.
| void soundsource::sourcespec::set_loops | ( | int | value | ) | [inline] |
Definition at line 158 of file soundsource.hpp.
References loops_.
| void soundsource::sourcespec::set_minimum_delay | ( | int | value | ) | [inline] |
Definition at line 191 of file soundsource.hpp.
References min_delay_.
| void soundsource::sourcespec::write | ( | config & | cfg | ) | const |
Serializes information into cfg as a new (appended) child of key "sound_source".
int soundsource::sourcespec::chance_ [private] |
Definition at line 122 of file soundsource.hpp.
Referenced by chance(), and set_chance().
bool soundsource::sourcespec::check_fogged_ [private] |
Definition at line 127 of file soundsource.hpp.
Referenced by check_fogged(), and set_check_fogged().
bool soundsource::sourcespec::check_shrouded_ [private] |
Definition at line 128 of file soundsource.hpp.
Referenced by check_shrouded(), and set_check_shrouded().
int soundsource::sourcespec::faderange_ [private] |
Definition at line 126 of file soundsource.hpp.
Referenced by fade_range(), and set_fade_range().
const std::string soundsource::sourcespec::files_ [private] |
Definition at line 119 of file soundsource.hpp.
Referenced by files().
const std::string soundsource::sourcespec::id_ [private] |
Definition at line 118 of file soundsource.hpp.
Referenced by id().
std::vector<map_location> soundsource::sourcespec::locations_ [private] |
Definition at line 130 of file soundsource.hpp.
Referenced by get_locations(), and sourcespec().
int soundsource::sourcespec::loops_ [private] |
Definition at line 124 of file soundsource.hpp.
Referenced by loops(), and set_loops().
int soundsource::sourcespec::min_delay_ [private] |
Definition at line 121 of file soundsource.hpp.
Referenced by minimum_delay(), and set_minimum_delay().
int soundsource::sourcespec::range_ [private] |
Definition at line 125 of file soundsource.hpp.
Referenced by full_range(), and set_full_range().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:01 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |