libopenraw
Public Types | Public Member Functions | Static Public Member Functions

OpenRaw::Internals::RawFileFactory Class Reference

List of all members.

Public Types

typedef boost::function
< RawFile *(IO::Stream *) 
raw_file_factory_t )
typedef std::map
< RawFile::Type,
raw_file_factory_t > 
Table
typedef std::map< std::string,
RawFile::Type > 
Extensions

Public Member Functions

 RawFileFactory (RawFile::Type type, const raw_file_factory_t &fn, const char *ext)

Static Public Member Functions

static Tabletable ()
static Extensions & extensions ()
static const char ** fileExtensions ()
static void registerType (RawFile::Type type, const raw_file_factory_t &fn, const char *ext)
static void unRegisterType (RawFile::Type type)

Detailed Description

Definition at line 36 of file rawfilefactory.h.


Member Typedef Documentation

typedef std::map<RawFile::Type, raw_file_factory_t> OpenRaw::Internals::RawFileFactory::Table

the factory type for raw files key is the extension. file is factory method

Definition at line 44 of file rawfilefactory.h.


Constructor & Destructor Documentation

OpenRaw::Internals::RawFileFactory::RawFileFactory ( RawFile::Type  type,
const raw_file_factory_t &  fn,
const char *  ext 
)

register a filetype with the factory

Parameters:
typethe type of file
fnthe factory method
extthe extension associated
Note:
it is safe to call this method with the same fn and type to register a different extension

Definition at line 36 of file rawfilefactory.cpp.


Member Function Documentation

RawFileFactory::Extensions & OpenRaw::Internals::RawFileFactory::extensions ( ) [inline, static]

access the extensions table. Ensure that it has been constructed.

the factory table

Definition at line 85 of file rawfilefactory.h.

const char ** OpenRaw::Internals::RawFileFactory::fileExtensions ( ) [static]

access the the list of file extenstions registered.

Definition at line 72 of file rawfilefactory.cpp.

RawFileFactory::Table & OpenRaw::Internals::RawFileFactory::table ( ) [inline, static]

access the table. Ensure that it has been constructed.

accessor. This make sure the instance has been constructed when needed

the factory table

Definition at line 78 of file rawfilefactory.h.


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