CL_ImageProviderFactory Class Reference
[clanDisplay Image Providers]

Image Provider factory. More...

#include <provider_factory.h>

List of all members.

Static Public Member Functions

Operations

static CL_PixelBuffer try_load (const CL_String &filename, const CL_String &type=CL_String(), CL_VirtualDirectory directory=CL_VirtualDirectory(), CL_String *out_failure_reason=0)
 Attempts to load an image file from 'filename', using the provider identified by 'type'.
static CL_PixelBuffer load (const CL_String &filename, const CL_VirtualDirectory &directory, const CL_String &type=CL_String())
 Loads an image file from 'filename', using the provider.
static CL_PixelBuffer load (const CL_String &fullname, const CL_String &type=CL_String())
static CL_PixelBuffer load (CL_IODevice &file, const CL_String &type)
static void save (CL_PixelBuffer buffer, const CL_String &filename, CL_VirtualDirectory &directory, const CL_String &type=CL_String())
 Saves the given CL_PixelBuffer to the file given by 'filename'.
static void save (CL_PixelBuffer buffer, const CL_String &fullname, const CL_String &type=CL_String())
static void save (CL_PixelBuffer buffer, CL_IODevice &file, const CL_String &type)

Static Public Attributes

Static Attributes

static std::map< CL_String,
CL_ImageProviderType * > 
types
 Map of the class factories for each provider type.

Detailed Description

Image Provider factory.


Member Function Documentation

static CL_PixelBuffer CL_ImageProviderFactory::load ( const CL_String filename,
const CL_VirtualDirectory directory,
const CL_String type = CL_String() 
) [static]

Loads an image file from 'filename', using the provider.

identified by 'type'.

If the type is an empty string, it uses the extension of the filename to determine what type it is.

The virtual directory will be used as a the source.

static CL_PixelBuffer CL_ImageProviderFactory::load ( CL_IODevice file,
const CL_String type 
) [static]
static CL_PixelBuffer CL_ImageProviderFactory::load ( const CL_String fullname,
const CL_String type = CL_String() 
) [static]
static void CL_ImageProviderFactory::save ( CL_PixelBuffer  buffer,
const CL_String filename,
CL_VirtualDirectory directory,
const CL_String type = CL_String() 
) [static]

Saves the given CL_PixelBuffer to the file given by 'filename'.

If the type is an empty string, it uses the extension of the filename to determine what type it is

static void CL_ImageProviderFactory::save ( CL_PixelBuffer  buffer,
CL_IODevice file,
const CL_String type 
) [static]
static void CL_ImageProviderFactory::save ( CL_PixelBuffer  buffer,
const CL_String fullname,
const CL_String type = CL_String() 
) [static]
static CL_PixelBuffer CL_ImageProviderFactory::try_load ( const CL_String filename,
const CL_String type = CL_String(),
CL_VirtualDirectory  directory = CL_VirtualDirectory(),
CL_String out_failure_reason = 0 
) [static]

Attempts to load an image file from 'filename', using the provider identified by 'type'.

Returns:
If the function fails to load the image, a null pixel buffer object is returned.

If the type is an empty string, it uses the extension of the filename to determine what type it is.

The virtual directory will be used as a the source.


Member Data Documentation

Map of the class factories for each provider type.


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