SDLSurfacePtr Class Reference

Simple Wrapper class around SDL_Surface that provides execption safety. More...

#include <sdl_surface_ptr.hpp>

List of all members.

Public Member Functions

 SDLSurfacePtr ()
 SDLSurfacePtr (SDL_Surface *surface)
 ~SDLSurfacePtr ()
SDL_Surfaceoperator-> ()
void reset (SDL_Surface *surface)
SDL_Surfaceget ()
 operator void * ()

Private Member Functions

 SDLSurfacePtr (const SDLSurfacePtr &)
SDLSurfacePtroperator= (const SDLSurfacePtr &)

Private Attributes

SDL_Surfacem_surface


Detailed Description

Simple Wrapper class around SDL_Surface that provides execption safety.

Definition at line 24 of file sdl_surface_ptr.hpp.


Constructor & Destructor Documentation

SDLSurfacePtr::SDLSurfacePtr (  )  [inline]

Definition at line 30 of file sdl_surface_ptr.hpp.

00030                   :
00031     m_surface(0)
00032   {}

SDLSurfacePtr::SDLSurfacePtr ( SDL_Surface surface  )  [inline]

Definition at line 34 of file sdl_surface_ptr.hpp.

00034                                       :
00035     m_surface(surface)
00036   {}

SDLSurfacePtr::~SDLSurfacePtr (  )  [inline]

Definition at line 38 of file sdl_surface_ptr.hpp.

References m_surface.

00039   {
00040     SDL_FreeSurface(m_surface);
00041   }

SDLSurfacePtr::SDLSurfacePtr ( const SDLSurfacePtr  )  [private]


Member Function Documentation

SDL_Surface* SDLSurfacePtr::operator-> (  )  [inline]

Definition at line 43 of file sdl_surface_ptr.hpp.

References m_surface.

00044   {
00045     return m_surface;
00046   }

void SDLSurfacePtr::reset ( SDL_Surface surface  )  [inline]

Definition at line 48 of file sdl_surface_ptr.hpp.

References m_surface.

00049   {
00050     SDL_FreeSurface(m_surface);
00051     m_surface = surface;
00052   }

SDL_Surface* SDLSurfacePtr::get (  )  [inline]

Definition at line 54 of file sdl_surface_ptr.hpp.

References m_surface.

Referenced by TextureManager::create_dummy_texture(), and TextureManager::create_image_texture_raw().

00055   {
00056     return m_surface;
00057   }

SDLSurfacePtr::operator void * (  )  [inline]

Definition at line 59 of file sdl_surface_ptr.hpp.

References m_surface.

00059                    {
00060     return m_surface;
00061   }

SDLSurfacePtr& SDLSurfacePtr::operator= ( const SDLSurfacePtr  )  [private]


Member Data Documentation

SDL_Surface* SDLSurfacePtr::m_surface [private]

Definition at line 27 of file sdl_surface_ptr.hpp.

Referenced by get(), operator void *(), operator->(), reset(), and ~SDLSurfacePtr().


The documentation for this class was generated from the following file:
Generated on Mon Jun 9 03:38:35 2014 for SuperTux by  doxygen 1.5.1