The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
surface Class Reference

#include <surface.hpp>

Public Member Functions

 surface ()
 
 surface (SDL_Surface *surf)
 
 surface (const surface &s)
 
 surface (surface &&s)
 
 ~surface ()
 
void assign (SDL_Surface *surf)
 
void assign (const surface &s)
 
surfaceoperator= (const surface &s)
 
surfaceoperator= (surface &&s)
 
void clear_without_free ()
 
 operator SDL_Surface * () const
 
SDL_Surface * get () const
 
SDL_Surface * operator-> () const
 
bool null () const
 

Private Member Functions

void assign_surface_internal (SDL_Surface *surf)
 
void free_surface ()
 

Static Private Member Functions

static void add_surface_ref (SDL_Surface *surf)
 

Private Attributes

SDL_Surface * surface_
 

Detailed Description

Definition at line 22 of file surface.hpp.

Constructor & Destructor Documentation

◆ surface() [1/4]

surface::surface ( )
inline

Definition at line 25 of file surface.hpp.

◆ surface() [2/4]

surface::surface ( SDL_Surface *  surf)
inline

Definition at line 28 of file surface.hpp.

◆ surface() [3/4]

surface::surface ( const surface s)
inline

Definition at line 31 of file surface.hpp.

References add_surface_ref(), and surface_.

◆ surface() [4/4]

surface::surface ( surface &&  s)
inline

Definition at line 36 of file surface.hpp.

References s.

◆ ~surface()

surface::~surface ( )
inline

Definition at line 41 of file surface.hpp.

References free_surface().

Member Function Documentation

◆ add_surface_ref()

static void surface::add_surface_ref ( SDL_Surface *  surf)
inlinestaticprivate

Definition at line 82 of file surface.hpp.

Referenced by assign_surface_internal(), and surface().

◆ assign() [1/2]

void surface::assign ( SDL_Surface *  surf)
inline

◆ assign() [2/2]

void surface::assign ( const surface s)
inline

Definition at line 51 of file surface.hpp.

References assign_surface_internal(), and get().

◆ assign_surface_internal()

void surface::assign_surface_internal ( SDL_Surface *  surf)
inlineprivate

Definition at line 89 of file surface.hpp.

References add_surface_ref(), free_surface(), and surface_.

Referenced by assign().

◆ clear_without_free()

void surface::clear_without_free ( )
inline

Definition at line 71 of file surface.hpp.

References surface_.

Referenced by CVideo::update_framebuffer().

◆ free_surface()

void surface::free_surface ( )
private

Definition at line 20 of file surface.cpp.

References sdl_get_version(), and surface_.

Referenced by assign_surface_internal(), operator=(), and ~surface().

◆ get()

SDL_Surface* surface::get ( ) const
inline

Definition at line 75 of file surface.hpp.

References surface_.

Referenced by gui::textbox::append_text(), assign(), and operator<().

◆ null()

bool surface::null ( ) const
inline

◆ operator SDL_Surface *()

surface::operator SDL_Surface * ( ) const
inline

Definition at line 73 of file surface.hpp.

References surface_.

◆ operator->()

SDL_Surface* surface::operator-> ( ) const
inline

Definition at line 77 of file surface.hpp.

References surface_.

◆ operator=() [1/2]

surface& surface::operator= ( const surface s)
inline

Definition at line 56 of file surface.hpp.

References assign().

◆ operator=() [2/2]

surface& surface::operator= ( surface &&  s)
inline

Definition at line 62 of file surface.hpp.

References free_surface(), s, and surface_.

Member Data Documentation

◆ surface_

SDL_Surface* surface::surface_
private

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