Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

SurfaceLock Class Reference

Inheritance diagram for SurfaceLock:

Inheritance graph
[legend]
Collaboration diagram for SurfaceLock:

Collaboration graph
[legend]

Detailed Description

Lock and unlock surface.

Definition at line 11 of file SurfaceLock.h.

Public Member Functions

 SurfaceLock (SDL_Surface *surface)
 Lock surface when necessary.
virtual ~SurfaceLock ()
 Unlock surface.


Constructor & Destructor Documentation

SurfaceLock::SurfaceLock SDL_Surface *  surface  ) 
 

Lock surface when necessary.

Exceptions:
SDLException when surface cannot be locked

Definition at line 19 of file SurfaceLock.cpp.

00020 {
00021     m_surface = surface;
00022     if (SDL_MUSTLOCK(m_surface)) {
00023         if (SDL_LockSurface(m_surface) < 0) {
00024             throw SDLException(ExInfo("LockSurface"));
00025         }
00026     }
00027 }

SurfaceLock::~SurfaceLock  )  [virtual]
 

Unlock surface.

Definition at line 32 of file SurfaceLock.cpp.

00033 {
00034     if (SDL_MUSTLOCK(m_surface)) {
00035         SDL_UnlockSurface(m_surface);
00036     }
00037 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:57:02 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2