openModeller  Version 1.4.0
RasterFactory Class Reference

Build a Raster. More...

#include <RasterFactory.hh>

List of all members.

Public Member Functions

bool registerDriver (const string &driverId, CreateRasterCallback builder)
bool unregisterDriver (const string &driverId)
 Unregister a Raster.
Rastercreate (const string &source, int categ=0)
Rastercreate (const string &source, const MapFormat &format)

Static Public Member Functions

static RasterFactoryinstance ()

Private Types

typedef Raster *(* CreateRasterCallback )()
typedef std::map< string,
CreateRasterCallback
DriversMap

Private Member Functions

 RasterFactory ()
 RasterFactory (const RasterFactory &)
 No copy allowed.
RasterFactoryoperator= (const RasterFactory &)
 No copy allowed.
 ~RasterFactory ()
 No destructor allowed.

Private Attributes

DriversMap _drivers
 Map of Rasters and identifiers.

Static Private Attributes

static bool _initiated

Detailed Description

Build a Raster.

Its a Factory pattern to Build a Raster using a raster lib that is specified in a url. Register or Unregister a raster lib to use with openModeller. Default raster lib is GDAL http://www.remotesensing.org/gdal . Its a Singleton Pattern.

Definition at line 56 of file RasterFactory.hh.


Member Typedef Documentation

Definition at line 62 of file RasterFactory.hh.

typedef std::map<string, CreateRasterCallback> RasterFactory::DriversMap [private]

Definition at line 65 of file RasterFactory.hh.


Constructor & Destructor Documentation

RasterFactory::RasterFactory ( ) [inline, private]

Definition at line 106 of file RasterFactory.hh.

No copy allowed.

RasterFactory::~RasterFactory ( ) [inline, private]

No destructor allowed.

Definition at line 115 of file RasterFactory.hh.


Member Function Documentation

Raster * RasterFactory::create ( const string &  source,
int  categ = 0 
)

Open an existing raster (read only).

Definition at line 79 of file RasterFactory.cpp.

References _drivers, and Raster::createRaster().

Referenced by RequestFile::_setProjection(), main(), and MapFormat::MapFormat().

Here is the call graph for this function:

Raster * RasterFactory::create ( const string &  source,
const MapFormat format 
)

Create a new file for projections.

Definition at line 173 of file RasterFactory.cpp.

References _drivers, and Raster::createRaster().

Here is the call graph for this function:

RasterFactory& RasterFactory::operator= ( const RasterFactory ) [private]

No copy allowed.

bool RasterFactory::registerDriver ( const string &  driverId,
CreateRasterCallback  builder 
)

Register a Raster.

Parameters:
driverIdRaster Identifier.
builderFunction pointer to builder function.

Definition at line 63 of file RasterFactory.cpp.

References _drivers.

Referenced by instance().

bool RasterFactory::unregisterDriver ( const string &  driverId)

Unregister a Raster.

Definition at line 71 of file RasterFactory.cpp.

References _drivers.


Member Data Documentation

Map of Rasters and identifiers.

Definition at line 103 of file RasterFactory.hh.

Referenced by create(), registerDriver(), and unregisterDriver().

bool RasterFactory::_initiated [static, private]

Definition at line 100 of file RasterFactory.hh.

Referenced by instance().


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