The Battle for Wesnoth  1.17.4+dev
Public Member Functions | Private Attributes | List of all members
render_raii_rect_setter_base< G, S > Class Template Reference

Base class for renderer RAII helpers that operate on SDL_Rects. More...

#include <render_utils.hpp>

Public Member Functions

 render_raii_rect_setter_base (SDL_Rect *rect)
 
 ~render_raii_rect_setter_base ()
 

Private Attributes

const bool operate_
 
SDL_Rect last_rect_
 
SDL_Renderer * renderer_
 

Detailed Description

template<sdl_rect_getter G, sdl_rect_setter S>
class render_raii_rect_setter_base< G, S >

Base class for renderer RAII helpers that operate on SDL_Rects.

Template Parameters
GGetter function. Will fetch the current applicable rect. That will be restored as the applicable state once this object is destroyed.
SSetter function.

Definition at line 69 of file render_utils.hpp.

Constructor & Destructor Documentation

◆ render_raii_rect_setter_base()

template<sdl_rect_getter G, sdl_rect_setter S>
render_raii_rect_setter_base< G, S >::render_raii_rect_setter_base ( SDL_Rect *  rect)
inlineexplicit

Definition at line 72 of file render_utils.hpp.

References render_target_setter::renderer_.

◆ ~render_raii_rect_setter_base()

template<sdl_rect_getter G, sdl_rect_setter S>
render_raii_rect_setter_base< G, S >::~render_raii_rect_setter_base ( )
inline

Definition at line 83 of file render_utils.hpp.

References sdl::empty_rect, and render_target_setter::renderer_.

Member Data Documentation

◆ last_rect_

template<sdl_rect_getter G, sdl_rect_setter S>
SDL_Rect render_raii_rect_setter_base< G, S >::last_rect_
private

Definition at line 96 of file render_utils.hpp.

◆ operate_

template<sdl_rect_getter G, sdl_rect_setter S>
const bool render_raii_rect_setter_base< G, S >::operate_
private

Definition at line 95 of file render_utils.hpp.

◆ renderer_

template<sdl_rect_getter G, sdl_rect_setter S>
SDL_Renderer* render_raii_rect_setter_base< G, S >::renderer_
private

Definition at line 97 of file render_utils.hpp.


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