openModeller
Version 1.5.0
|
#include <RasterFactory.hh>
Public Member Functions | |
bool | registerDriver (const string &driverId, CreateRasterCallback builder) |
bool | unregisterDriver (const string &driverId) |
Unregister a Raster. More... | |
Raster * | create (const string &source, int categ=0) |
Raster * | create (const string &source, const MapFormat &format) |
Static Public Member Functions | |
static RasterFactory & | instance () |
Private Types | |
typedef Raster *(* | CreateRasterCallback )() |
typedef std::map< string, CreateRasterCallback > | DriversMap |
Private Member Functions | |
RasterFactory () | |
RasterFactory (const RasterFactory &) | |
No copy allowed. More... | |
RasterFactory & | operator= (const RasterFactory &) |
No copy allowed. More... | |
~RasterFactory () | |
No destructor allowed. More... | |
Private Attributes | |
DriversMap | _drivers |
Map of Rasters and identifiers. More... | |
Static Private Attributes | |
static bool | _initiated |
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.
|
private |
Definition at line 62 of file RasterFactory.hh.
|
private |
Definition at line 65 of file RasterFactory.hh.
|
inlineprivate |
Definition at line 106 of file RasterFactory.hh.
|
private |
No copy allowed.
|
inlineprivate |
No destructor allowed.
Definition at line 115 of file RasterFactory.hh.
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().
Create a new file for projections.
Definition at line 173 of file RasterFactory.cpp.
References _drivers, and Raster::createRaster().
|
static |
Returns the unique instance of RasterFactory.
Definition at line 42 of file RasterFactory.cpp.
References _initiated, TerralibRaster::CreateRasterCallback(), WcsProxyRaster::CreateRasterCallback(), and registerDriver().
Referenced by RequestFile::_setProjection(), OpenModeller::createMap(), EnvironmentImpl::loadLayers(), main(), and MapFormat::MapFormat().
|
private |
No copy allowed.
bool RasterFactory::registerDriver | ( | const string & | driverId, |
CreateRasterCallback | builder | ||
) |
Register a Raster.
driverId | Raster Identifier. |
builder | Function pointer to builder function. |
Definition at line 63 of file RasterFactory.cpp.
References _drivers.
Referenced by instance().
bool RasterFactory::unregisterDriver | ( | const string & | driverId | ) |
|
private |
Map of Rasters and identifiers.
Definition at line 103 of file RasterFactory.hh.
Referenced by create(), registerDriver(), and unregisterDriver().
|
staticprivate |
Definition at line 100 of file RasterFactory.hh.
Referenced by instance().