te::mem::ExpansibleRasterFactory Class Reference

#include <ExpansibleRasterFactory.h>

Inheritance diagram for te::mem::ExpansibleRasterFactory:
te::rst::RasterFactory te::common::AbstractFactory< Raster, std::string >

Public Types

typedef FactoryDictionary< AbstractFactory< Raster, std::string, std::less< std::string > >, std::string, std::less< std::string > > dictionary_type
 
typedef AbstractFactory factory_type
 

Public Member Functions

std::map< std::string, std::string > getCapabilities () const
 It returns a map<string, string> containing all supported formats. More...
 
void getCreationalParameters (std::vector< std::pair< std::string, std::string > > &params) const
 It returns the list of parameters accepted as raster info. More...
 
const std::string & getKey () const
 It returns the factory key associated to the concreate factory. More...
 
const std::string & getType () const
 Returns the type (name) of this factory. More...
 
 ~ExpansibleRasterFactory ()
 

Static Public Member Functions

static void finalize ()
 It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory DataSourceFactory. More...
 
static const factory_typefind (const std::string &factoryKey)
 
static dictionary_typegetDictionary ()
 It returns a reference to the internal dictionary of concrete factories. More...
 
static void initialize ()
 It initializes the factory: the singleton instance will be registered in the abstract factory DataSourceFactory. More...
 
static Rastermake ()
 It creates and returns an empty raster with default raster driver. More...
 
static Rastermake (const std::string &rType)
 It creates an empty raster with the proper driver. More...
 
static Rastermake (Grid *g, const std::vector< BandProperty * > bands, const std::map< std::string, std::string > &rinfo, void *h=0, void(*deleter)(void *)=0)
 It creates a raster with the given parameters using the default raster driver. More...
 
static Rastermake (const std::string &rType, Grid *g, const std::vector< BandProperty * > bands, const std::map< std::string, std::string > &rinfo, void *h=0, void(*deleter)(void *)=0)
 It creates a raster with the given parameters using a proper driver. More...
 
static Rastermake (const std::map< std::string, std::string > &rinfo, void *h=0, void(*deleter)(void *)=0)
 It creates a raster with the given parameters using the default driver. More...
 
static Rastermake (const std::string &rType, const std::map< std::string, std::string > &rinfo, void *h, void(*deleter)(void *)=0)
 It creates a raster with the given parameters using a proper driver. More...
 
static Rasteropen (const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
 It opens a raster with the given parameters and default raster driver. More...
 
static Rasteropen (const std::string &rType, const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
 It creates a raster with the given parameters. More...
 
static Rasteropen (const std::string &key, const std::string &value, te::common::AccessPolicy p=te::common::RAccess)
 It creates a raster with the given parameters and default raster driver. More...
 
static Rasteropen (const std::string &rType, const std::string &key, const std::string &value, te::common::AccessPolicy p=te::common::RAccess)
 It creates a raster with the given parameters. More...
 

Protected Member Functions

te::rst::Rasterbuild ()
 Concrete factories (derived from this one) must implement this method in order to create objects. More...
 
te::rst::Rastercreate (te::rst::Grid *g, const std::vector< te::rst::BandProperty * > bands, const std::map< std::string, std::string > &rinfo, void *h=0, void(*deleter)(void *)=0)
 This method must be implemented by subclasses (raster drivers). More...
 
 ExpansibleRasterFactory ()
 
virtual RasteriOpen (const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
 This method may be re-implemented by subclasses in order to have a finner control for the raster object instantiation. More...
 

Protected Attributes

std::string m_factoryKey
 The key that identifies the concrete factory: it will be used for unregistering the factory during destruction. More...
 

Static Private Attributes

static ExpansibleRasterFactorysm_factoryPointer
 

Detailed Description

is the concrete factory for expansible raster.

Note
The factory ID for this factory is EXPANSIBLE.
This factory accepts the following raster infor (rinfo) parameter: MAXMEMPERCENTUSED - The maximum free memory percentual to use valid range: [1:100].
This factory accepts the following raster infor (rinfo) parameter: MAXNUMBEROFRAMBLOCKS - The maximum number of RAM blocks.
See also
te::rst::RasterFactory

Definition at line 50 of file ExpansibleRasterFactory.h.

Member Typedef Documentation

typedef FactoryDictionary<AbstractFactory<Raster , std::string , std::less<std::string > >, std::string , std::less<std::string > > te::common::AbstractFactory< Raster , std::string , std::less<std::string > >::dictionary_type
inherited

Definition at line 73 of file AbstractFactory.h.

typedef AbstractFactory te::common::AbstractFactory< Raster , std::string , std::less<std::string > >::factory_type
inherited

Definition at line 77 of file AbstractFactory.h.

Constructor & Destructor Documentation

te::mem::ExpansibleRasterFactory::~ExpansibleRasterFactory ( )
te::mem::ExpansibleRasterFactory::ExpansibleRasterFactory ( )
protected

Member Function Documentation

te::rst::Raster* te::mem::ExpansibleRasterFactory::build ( )
protectedvirtual

Concrete factories (derived from this one) must implement this method in order to create objects.

Returns
It returns an object created by the concrete factory.

Implements te::common::AbstractFactory< Raster, std::string >.

te::rst::Raster* te::mem::ExpansibleRasterFactory::create ( te::rst::Grid g,
const std::vector< te::rst::BandProperty * >  bands,
const std::map< std::string, std::string > &  rinfo,
void *  h = 0,
void(*)(void *)  deleter = 0 
)
protectedvirtual

This method must be implemented by subclasses (raster drivers).

Parameters
gThe raster grid. May be a NULL parameter. Implementations must take its ownership.
bandsA vector of band properties, one for each band. Implementations must take ownership of the pointers in this vector.
rinfoThe necessary information to create the raster.
hIt may be any specific value for a given driver. May be a NULL parameter.
deleterA pointer to a deleter function used to free the memory pointed by h. May be a NULL parameter. Implementations must use this method when it doesn't use 'h' anymore.
Returns
The new raster.
Note
The caller will take the ownership of the returned pointer.

Implements te::rst::RasterFactory.

static void te::mem::ExpansibleRasterFactory::finalize ( )
static

It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory DataSourceFactory.

static const factory_type* te::common::AbstractFactory< Raster , std::string , std::less<std::string > >::find ( const std::string &  factoryKey)
staticinherited
std::map<std::string, std::string> te::mem::ExpansibleRasterFactory::getCapabilities ( ) const
virtual

It returns a map<string, string> containing all supported formats.

Implements te::rst::RasterFactory.

void te::mem::ExpansibleRasterFactory::getCreationalParameters ( std::vector< std::pair< std::string, std::string > > &  params) const
virtual

It returns the list of parameters accepted as raster info.

Implements te::rst::RasterFactory.

static dictionary_type& te::common::AbstractFactory< Raster , std::string , std::less<std::string > >::getDictionary ( )
staticinherited

It returns a reference to the internal dictionary of concrete factories.

The dictionary is a singleton.

Returns
A reference to the internal dictionary.
const std::string & te::common::AbstractFactory< Raster , std::string , std::less<std::string > >::getKey ( ) const
inherited

It returns the factory key associated to the concreate factory.

Returns
The factory key associated to the concreate factory.
const std::string& te::mem::ExpansibleRasterFactory::getType ( ) const
virtual

Returns the type (name) of this factory.

Implements te::rst::RasterFactory.

static void te::mem::ExpansibleRasterFactory::initialize ( )
static

It initializes the factory: the singleton instance will be registered in the abstract factory DataSourceFactory.

virtual Raster* te::rst::RasterFactory::iOpen ( const std::map< std::string, std::string > &  rinfo,
te::common::AccessPolicy  p = te::common::RAccess 
)
protectedvirtualinherited

This method may be re-implemented by subclasses in order to have a finner control for the raster object instantiation.

Parameters
rinfoThe necessary information to open the raster.
pThe access policy.
Returns
A raster.
Note
The caller will take the ownership of the returned pointer.
static Raster* te::rst::RasterFactory::make ( )
staticinherited

It creates and returns an empty raster with default raster driver.

Returns
An empty raster.
Note
The caller will take the ownership of the returned pointer.

Referenced by te::rp::CreateRasterFileFromMatrix().

static Raster* te::rst::RasterFactory::make ( const std::string &  rType)
staticinherited

It creates an empty raster with the proper driver.

Parameters
rTypeThe name of the specific driver to be used to create the raster.
Returns
An empty raster.
Note
The caller will take the ownership of the returned pointer.
static Raster* te::rst::RasterFactory::make ( Grid g,
const std::vector< BandProperty * >  bands,
const std::map< std::string, std::string > &  rinfo,
void *  h = 0,
void(*)(void *)  deleter = 0 
)
staticinherited

It creates a raster with the given parameters using the default raster driver.

Parameters
gThe raster grid. The factory will take its ownership.
bandsA vector of band properties with one property for each band. The factory will take the ownership of all properties.
rinfoThe necessary information to create the raster.
hIt may be any specific value for a given driver.
deleterA pointer to a deleter function used to free the memory pointed by h.
Returns
A new raster.
Note
The caller will take the ownership of the returned pointer.
If you inform a deleter when the created raster is destroyed it will call it for the informed h pointer.
static Raster* te::rst::RasterFactory::make ( const std::string &  rType,
Grid g,
const std::vector< BandProperty * >  bands,
const std::map< std::string, std::string > &  rinfo,
void *  h = 0,
void(*)(void *)  deleter = 0 
)
staticinherited

It creates a raster with the given parameters using a proper driver.

Parameters
rTypeThe name of the specific driver to create the raster.
gThe raster grid. The factory will take its ownership.
bandsA vector of band properties, one property for each band. The factory will take the ownership of all properties.
rinfoThe necessary information to create the raster.
hIt may be any specific value for a given driver.
deleterA pointer to a deleter function used to free the memory pointed by h.
Returns
A new raster.
Note
The caller will take the ownership of the returned pointer.
If you inform a deleter when the created raster is destroyed it will call it for the informed h pointer.
static Raster* te::rst::RasterFactory::make ( const std::map< std::string, std::string > &  rinfo,
void *  h = 0,
void(*)(void *)  deleter = 0 
)
staticinherited

It creates a raster with the given parameters using the default driver.

Parameters
rinfoThe necessary information to create the raster.
hIt may be any specific value for a given driver.
deleterA pointer to a deleter function used to free the memory pointed by h.
Returns
A new raster.
Note
The caller will take the ownership of the returned pointer.
If you inform a deleter when the created raster is destroyed it will call it for the informed h pointer.
static Raster* te::rst::RasterFactory::make ( const std::string &  rType,
const std::map< std::string, std::string > &  rinfo,
void *  h,
void(*)(void *)  deleter = 0 
)
staticinherited

It creates a raster with the given parameters using a proper driver.

Parameters
rTypeThe name of the specific driver to create the raster.
rinfoThe necessary information to create the raster.
hIt may be any specific value for a given driver.
deleterA pointer to a deleter function used to free the memory pointed by h.
Returns
A new raster.
Note
The caller will take the ownership of the returned pointer.
If you inform a deleter when the created raster is destroyed it will call it for the informed h pointer.
static Raster* te::rst::RasterFactory::open ( const std::map< std::string, std::string > &  rinfo,
te::common::AccessPolicy  p = te::common::RAccess 
)
staticinherited

It opens a raster with the given parameters and default raster driver.

Parameters
rinfoThe necessary information to open the raster.
pThe access policy.
Returns
The opened raster.
Note
The caller will take the ownership of the returned pointer.
static Raster* te::rst::RasterFactory::open ( const std::string &  rType,
const std::map< std::string, std::string > &  rinfo,
te::common::AccessPolicy  p = te::common::RAccess 
)
staticinherited

It creates a raster with the given parameters.

Parameters
rTypeThe name of the specific driver to create the raster.
rinfoThe necessary information to open the raster.
pThe access policy.
Returns
The opened raster.
Note
The caller will take the ownership of the returned pointer.
static Raster* te::rst::RasterFactory::open ( const std::string &  key,
const std::string &  value,
te::common::AccessPolicy  p = te::common::RAccess 
)
staticinherited

It creates a raster with the given parameters and default raster driver.

Parameters
keyThe name of the key used to define raster location, ex.: "URI".
valueThe value of the key to define raster location, ex.: "/path/to/raster.tif".
pThe access policy.
Returns
The opened raster.
Note
The caller will take the ownership of the returned pointer.
static Raster* te::rst::RasterFactory::open ( const std::string &  rType,
const std::string &  key,
const std::string &  value,
te::common::AccessPolicy  p = te::common::RAccess 
)
staticinherited

It creates a raster with the given parameters.

Parameters
rTypeThe name of the specific driver to create the raster.
keyThe name of the key used to define raster location, ex.: "URI".
valueThe value of the key to define raster location, ex.: "/path/to/raster.tif".
pThe access policy.
Returns
The opened raster.
Note
The caller will take the ownership of the returned pointer.

Member Data Documentation

std::string te::common::AbstractFactory< Raster , std::string , std::less<std::string > >::m_factoryKey
protectedinherited

The key that identifies the concrete factory: it will be used for unregistering the factory during destruction.

Definition at line 136 of file AbstractFactory.h.

ExpansibleRasterFactory* te::mem::ExpansibleRasterFactory::sm_factoryPointer
staticprivate

Definition at line 79 of file ExpansibleRasterFactory.h.


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