R-Type
Public Member Functions | List of all members
GameEngine::Music Class Reference

Class representing a music wrapper for sf::Music. More...

#include <SfmlTypes.hpp>

Inheritance diagram for GameEngine::Music:
GameEngine::IMusic< sf::Music >

Public Member Functions

 Music ()
 Default constructor for Music. More...
 
 ~Music ()=default
 Destructor for Music. More...
 
const sf::Music & getMusic () const override
 Returns the wrapped sf::Music. More...
 
void load (const std::string &filename)
 Loads music from a file. More...
 
void play () override
 play the loaded music More...
 
const std::string & getFilename () const
 Returns the filename of the loaded music. More...
 
- Public Member Functions inherited from GameEngine::IMusic< sf::Music >
 ~IMusic ()=default
 destructor More...
 

Detailed Description

Class representing a music wrapper for sf::Music.

Constructor & Destructor Documentation

◆ Music()

GameEngine::Music::Music ( )
inline

Default constructor for Music.

◆ ~Music()

GameEngine::Music::~Music ( )
default

Destructor for Music.

Member Function Documentation

◆ getFilename()

const std::string& GameEngine::Music::getFilename ( ) const
inline

Returns the filename of the loaded music.

Returns
Reference to the string containing the filename

◆ getMusic()

const sf::Music& GameEngine::Music::getMusic ( ) const
inlineoverridevirtual

Returns the wrapped sf::Music.

Returns
Reference to the sf::Music instance

Implements GameEngine::IMusic< sf::Music >.

◆ load()

void GameEngine::Music::load ( const std::string &  filename)
inlinevirtual

Loads music from a file.

Parameters
filenameThe path to the music file

Implements GameEngine::IMusic< sf::Music >.

◆ play()

void GameEngine::Music::play ( )
inlineoverridevirtual

play the loaded music

Implements GameEngine::IMusic< sf::Music >.


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