le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
Classes | Public Member Functions | Public Attributes | List of all members
LeBmpCache Class Reference

Cache and inventory all bitmaps loaded. More...

#include <bmpcache.h>

Classes

struct  Slot
 represents a bitmap cache slot More...
 

Public Member Functions

 LeBmpCache ()
 
 ~LeBmpCache ()
 
void clean ()
 Unload all resources in cache and remove entries. More...
 
void loadDirectory (const char *path)
 Load in cache all the recognized bitmap files from the given directory. More...
 
LeBitmaploadBMP (const char *path)
 Load a BMP file of given path and apply transforms. More...
 
int getSlotFromName (const char *name)
 Retrieve a bitmap slot index from a bitmap name or path. More...
 
LeBitmapgetBitmapFromName (const char *name)
 Retrieve a bitmap object from its name or path. More...
 

Public Attributes

Slot cacheSlots [LE_BMPCACHE_SLOTS]
 
int noSlots
 

Detailed Description

Cache and inventory all bitmaps loaded.

Constructor & Destructor Documentation

LeBmpCache::LeBmpCache ( )
LeBmpCache::~LeBmpCache ( )

Member Function Documentation

void LeBmpCache::clean ( )

Unload all resources in cache and remove entries.

LeBitmap * LeBmpCache::getBitmapFromName ( const char *  path)

Retrieve a bitmap object from its name or path.

Parameters
[in]pathbitmap path or name
Returns
bitmap object or default bitmap if not found
int LeBmpCache::getSlotFromName ( const char *  path)

Retrieve a bitmap slot index from a bitmap name or path.

Parameters
[in]pathbitmap path or name
Returns
cache slot number or 0 (default slot) if not found
LeBitmap * LeBmpCache::loadBMP ( const char *  path)

Load a BMP file of given path and apply transforms.

Parameters
[in]pathBMP file path
Returns
pointer to a new bitmap
void LeBmpCache::loadDirectory ( const char *  path)

Load in cache all the recognized bitmap files from the given directory.

Member Data Documentation

Slot LeBmpCache::cacheSlots[LE_BMPCACHE_SLOTS]

Slots in cache

int LeBmpCache::noSlots

Number of cacheSlots in cache


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