libSDL2pp
C++11 bindings/wrapper for SDL2
Public Member Functions | List of all members
SDL2pp::SDLMixer Class Reference

Helper class taking care of SDL_mixer library initialization and deinitialization. More...

#include <SDL2pp/SDLMixer.hh>

Public Member Functions

 SDLMixer (int flags=0)
 Initializes SDL_mixer library. More...
 
virtual ~SDLMixer ()
 Destructor, deinitializes SDL_mixer library. More...
 
int InitMore (int flags)
 Try to init more SDL_mixer formats. More...
 
int GetInitFlags ()
 Get mask of initialized SDL_mixer formats. More...
 
 SDLMixer (const SDLMixer &other)=delete
 Deleted copy constructor. More...
 
SDLMixeroperator= (const SDLMixer &other)=delete
 Deleted assignment operator. More...
 
 SDLMixer (SDLMixer &&other)=delete
 Deleted move constructor. More...
 
SDLMixeroperator= (SDLMixer &&other)=delete
 Deleted move assignment operator. More...
 

Detailed Description

Helper class taking care of SDL_mixer library initialization and deinitialization.

Usage example:

int main() {
SDL2pp::SDL sdl(SDL_INIT_VIDEO);
SDL2pp::SDLMixer mixer(MIX_INIT_OGG);
// SDL_mixer library is automatically deinitialized before exit
return 0;
}
Helper class taking care of SDL_mixer library initialization and deinitialization.
Definition: SDLMixer.hh:49
Helper class taking care of SDL library initialization and deinitialization.
Definition: SDL.hh:59

Constructor & Destructor Documentation

◆ SDLMixer() [1/3]

SDL2pp::SDLMixer::SDLMixer ( int  flags = 0)
explicit

Initializes SDL_mixer library.

Parameters
[in]flagsFlags to pass to Mix_Init()
Exceptions
SDL2pp::Exception
See also
https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC9

◆ ~SDLMixer()

SDL2pp::SDLMixer::~SDLMixer ( )
virtual

Destructor, deinitializes SDL_mixer library.

See also
https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC10

◆ SDLMixer() [2/3]

SDL2pp::SDLMixer::SDLMixer ( const SDLMixer other)
delete

Deleted copy constructor.

This class is not copyable

◆ SDLMixer() [3/3]

SDL2pp::SDLMixer::SDLMixer ( SDLMixer &&  other)
delete

Deleted move constructor.

This class is not movable

Member Function Documentation

◆ GetInitFlags()

int SDL2pp::SDLMixer::GetInitFlags ( )

Get mask of initialized SDL_mixer formats.

See also
https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC9

◆ InitMore()

int SDL2pp::SDLMixer::InitMore ( int  flags)

Try to init more SDL_mixer formats.

Parameters
[in]flagsFlags to pass to Mix_Init()
Exceptions
SDL2pp::Exception
See also
https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC9

◆ operator=() [1/2]

SDLMixer & SDL2pp::SDLMixer::operator= ( const SDLMixer other)
delete

Deleted assignment operator.

This class is not copyable

◆ operator=() [2/2]

SDLMixer & SDL2pp::SDLMixer::operator= ( SDLMixer &&  other)
delete

Deleted move assignment operator.

This class is not movable


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