|
libSDL2pp
C++ bindings/wrapper for SDL2
|
Helper class taking care of SDL library initialization and deinitialization. More...
#include <SDL2pp/SDL.hh>
Public Member Functions | |
| SDL (Uint32 flags) | |
| Initializes SDL2 library. | |
| virtual | ~SDL () |
| Destructor, deinitializes SDL2 library. | |
| SDL (const SDL &other)=delete | |
| Deleted copy constructor. | |
| SDL & | operator= (const SDL &other)=delete |
| Deleted assignment operator. | |
| SDL (SDL &&other)=delete | |
| Deleted move constructor. | |
| SDL & | operator= (SDL &&other)=delete |
| Deleted move assignment operator. | |
| Uint32 | WasInit (Uint32 flags) |
| Checks which SDL2 subsystems were initialized. | |
| void | InitSubSystem (Uint32 flags) |
| Initializes additional SDL2 subsystems. | |
| void | QuitSubSystem (Uint32 flags) |
| Deinitializes specific SDL2 subsystems. | |
Helper class taking care of SDL library initialization and deinitialization.
Before using any SDL2 functions, the library must be initialized. Likewise, it should be deinitialized before application exits. SDL2pp::SDL object takes care of this in a RAII way by initializing the library in constructor and deinitializing in destructor, with an ability to init/quit specific subsystems in between
Usage example:
| SDL2pp::SDL::SDL | ( | Uint32 | flags | ) |
Initializes SDL2 library.
| [in] | flags | Flags to pass to SDL_Init() |
| SDL2pp::Exception |
|
virtual |
Destructor, deinitializes SDL2 library.
|
delete |
Deleted copy constructor.
This class is not copyable
|
delete |
Deleted move constructor.
This class is not movable
| void SDL2pp::SDL::InitSubSystem | ( | Uint32 | flags | ) |
Initializes additional SDL2 subsystems.
| [in] | flags | Set of flags which determines which subsystems to initialize |
| SDL2pp::Exception |
Deleted assignment operator.
This class is not copyable
Deleted move assignment operator.
This class is not movable
| void SDL2pp::SDL::QuitSubSystem | ( | Uint32 | flags | ) |
Deinitializes specific SDL2 subsystems.
| [in] | flags | Set of flags which determines which subsystems to deinitialize |
| Uint32 SDL2pp::SDL::WasInit | ( | Uint32 | flags | ) |
Checks which SDL2 subsystems were initialized.
| [in] | flags | 0 to return mask of initialized subsystems or any combination of flags to return initialization status of the specified subsystems |