SDL Breakout Engine  0.1.0
An implementation of a Breakout game using sdl, implemented with efficient resource management.
Public Member Functions | Static Public Member Functions | List of all members
ImageManager Class Reference

#include <ImageManager.hpp>

Inheritance diagram for ImageManager:
ResourceManager< ImageManager, TextureWrapper >

Public Member Functions

int shutDown ()
 
int startUp (SDL_Renderer *in)
 
std::shared_ptr< TextureWrapperLoad (const std::string &path)
 
 ImageManager (ImageManager const &) = delete
 don't allow copying More...
 
void operator= (ImageManager const &) = delete
 don't allow assignment More...
 
- Public Member Functions inherited from ResourceManager< ImageManager, TextureWrapper >
bool AddAllResource ()
 
bool AddResource (const std::string &resourceName)
 
std::shared_ptr< TextureWrapperGetResource (const std::string &resourceName)
 
std::shared_ptr< TextureWrapperLoad (const std::string &path)
 
int shutDown ()
 

Static Public Member Functions

static ImageManager & instance ()
 

Additional Inherited Members

- Protected Member Functions inherited from ResourceManager< ImageManager, TextureWrapper >
 ResourceManager ()
 
 ResourceManager (ResourceManager const &)
 Allow subclasses to create a resource manager, but subclasses must ensure singleton functionality. More...
 
void operator= (ResourceManager const &)
 Allow subclasses to assign to a resource manager, but subclasses must ensure singleton functionality. More...
 
- Protected Attributes inherited from ResourceManager< ImageManager, TextureWrapper >
std::map< std::string, std::string > fileMap
 stores location of resources More...
 
std::map< std::string, std::pair< std::shared_ptr< TextureWrapper >, int > > resourceMap
 Internal resource mapping inherited by manager implementations. More...
 

Detailed Description

uses SDL_image library to load images from disk, manages them.

Constructor & Destructor Documentation

ImageManager::ImageManager ( ImageManager const &  )
delete

don't allow copying

Member Function Documentation

static ImageManager& ImageManager::instance ( )
inlinestatic

Returns a singleotn instance of this class.

std::shared_ptr<TextureWrapper> ImageManager::Load ( const std::string &  path)
inline

Load an image at a given path.

Parameters
paththe file location
void ImageManager::operator= ( ImageManager const &  )
delete

don't allow assignment

int ImageManager::shutDown ( )
inline

Shuts down the image engine and resource manager.

int ImageManager::startUp ( SDL_Renderer *  in)
inline

starts up the image engine and prepares the manager to load resources. Modify file mapping here.

Parameters
inthe renderer being used.

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