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 Member Functions | Private Attributes | List of all members
sound::music_track Class Reference

Internal representation of music tracks. More...

#include <sound_music_track.hpp>

Public Member Functions

 music_track ()
 
 music_track (const config &node)
 
 music_track (const std::string &v_name)
 
void write (config &parent_node, bool append) const
 
bool valid () const
 
bool append () const
 
bool immediate () const
 
bool shuffle () const
 
bool play_once () const
 
int ms_before () const
 
int ms_after () const
 
const std::stringfile_path () const
 
const std::stringid () const
 
const std::stringtitle () const
 
void set_play_once (bool v)
 

Private Member Functions

void resolve ()
 

Private Attributes

std::string id_
 
std::string file_path_
 
std::string title_
 
int ms_before_
 
int ms_after_
 
bool once_
 
bool append_
 
bool immediate_
 
bool shuffle_
 

Detailed Description

Internal representation of music tracks.

Definition at line 28 of file sound_music_track.hpp.

Constructor & Destructor Documentation

sound::music_track::music_track ( )

Definition at line 33 of file sound_music_track.cpp.

sound::music_track::music_track ( const config node)

Definition at line 45 of file sound_music_track.cpp.

References resolve().

sound::music_track::music_track ( const std::string v_name)

Definition at line 59 of file sound_music_track.cpp.

References resolve().

Member Function Documentation

bool sound::music_track::append ( ) const
inline

Definition at line 38 of file sound_music_track.hpp.

References append_.

Referenced by sound::play_music_config().

const std::string& sound::music_track::file_path ( ) const
inline
const std::string& sound::music_track::id ( ) const
inline
bool sound::music_track::immediate ( ) const
inline

Definition at line 39 of file sound_music_track.hpp.

References immediate_.

Referenced by sound::play_music_config().

int sound::music_track::ms_after ( ) const
inline

Definition at line 43 of file sound_music_track.hpp.

References ms_after_.

int sound::music_track::ms_before ( ) const
inline

Definition at line 42 of file sound_music_track.hpp.

References ms_before_.

bool sound::music_track::play_once ( ) const
inline

Definition at line 41 of file sound_music_track.hpp.

References once_.

Referenced by sound::play_music_config().

void sound::music_track::resolve ( )
private
void sound::music_track::set_play_once ( bool  v)
inline

Definition at line 49 of file sound_music_track.hpp.

References once_.

bool sound::music_track::shuffle ( ) const
inline

Definition at line 40 of file sound_music_track.hpp.

References shuffle_.

const std::string& sound::music_track::title ( ) const
inline

Definition at line 47 of file sound_music_track.hpp.

References title_.

bool sound::music_track::valid ( ) const
inline

Definition at line 36 of file sound_music_track.hpp.

References file_path_.

Referenced by sound::play_music_config().

void sound::music_track::write ( config parent_node,
bool  append 
) const

Definition at line 130 of file sound_music_track.cpp.

References config::add_child(), id_, ms_after_, ms_before_, and shuffle_.

Member Data Documentation

bool sound::music_track::append_
private

Definition at line 61 of file sound_music_track.hpp.

Referenced by append().

std::string sound::music_track::file_path_
private

Definition at line 55 of file sound_music_track.hpp.

Referenced by file_path(), resolve(), and valid().

std::string sound::music_track::id_
private

Definition at line 54 of file sound_music_track.hpp.

Referenced by id(), resolve(), and write().

bool sound::music_track::immediate_
private

Definition at line 62 of file sound_music_track.hpp.

Referenced by immediate().

int sound::music_track::ms_after_
private

Definition at line 58 of file sound_music_track.hpp.

Referenced by ms_after(), and write().

int sound::music_track::ms_before_
private

Definition at line 58 of file sound_music_track.hpp.

Referenced by ms_before(), and write().

bool sound::music_track::once_
private

Definition at line 60 of file sound_music_track.hpp.

Referenced by play_once(), and set_play_once().

bool sound::music_track::shuffle_
private

Definition at line 63 of file sound_music_track.hpp.

Referenced by shuffle(), and write().

std::string sound::music_track::title_
private

Definition at line 56 of file sound_music_track.hpp.

Referenced by resolve(), and title().


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