openModeller  Version 1.4.0
OccurrencesFactory Class Reference

#include <OccurrencesFactory.hh>

Collaboration diagram for OccurrencesFactory:

List of all members.

Public Member Functions

bool registerDriver (const string &driverId, CreateOccurrencesReaderCallback builder)
bool unregisterDriver (const string &driverId)
vector< string > getRegisteredDrivers ()
OccurrencesReadercreate (const char *source, const char *coordSystem)

Static Public Member Functions

static OccurrencesFactoryinstance ()

Private Types

typedef OccurrencesReader *(* CreateOccurrencesReaderCallback )(const char *source, const char *coordSystem)
typedef map< string,
CreateOccurrencesReaderCallback
DriversMap

Private Member Functions

 OccurrencesFactory ()
 OccurrencesFactory (const OccurrencesFactory &)
OccurrencesFactoryoperator= (const OccurrencesFactory &)
 ~OccurrencesFactory ()

Private Attributes

DriversMap _drivers

Static Private Attributes

static bool _initiated

Detailed Description

OccurrencesReader factory.

Definition at line 57 of file OccurrencesFactory.hh.


Member Typedef Documentation

typedef OccurrencesReader*(* OccurrencesFactory::CreateOccurrencesReaderCallback)(const char *source, const char *coordSystem) [private]

Definition at line 63 of file OccurrencesFactory.hh.

Definition at line 66 of file OccurrencesFactory.hh.


Constructor & Destructor Documentation

Definition at line 108 of file OccurrencesFactory.hh.

Definition at line 117 of file OccurrencesFactory.hh.


Member Function Documentation

OccurrencesReader * OccurrencesFactory::create ( const char *  source,
const char *  coordSystem 
)

Return an OccurrencesReader given a source string.

Parameters:
sourceURL used to locate the occurrences.
coordSystemcoord system.

Definition at line 103 of file OccurrencesFactory.cpp.

References _drivers, instance(), and OccurrencesReader::load().

Referenced by RequestFile::_setOccurrences(), main(), and readOccurrences().

Here is the call graph for this function:

Return registered drivers (vector of driver ids).

Definition at line 83 of file OccurrencesFactory.cpp.

References _drivers.

Referenced by main().

OccurrencesFactory& OccurrencesFactory::operator= ( const OccurrencesFactory ) [private]
bool OccurrencesFactory::registerDriver ( const string &  driverId,
CreateOccurrencesReaderCallback  builder 
)

Register an OccurrencesReader driver.

Parameters:
driverIdDriver identifier.
builderFunction pointer to builder function.

Definition at line 67 of file OccurrencesFactory.cpp.

References _drivers.

Referenced by instance().

bool OccurrencesFactory::unregisterDriver ( const string &  driverId)

Unregister an OccurrencesReader driver.

Parameters:
driverIdDriver identifier.

Definition at line 75 of file OccurrencesFactory.cpp.

References _drivers.


Member Data Documentation

bool OccurrencesFactory::_initiated [static, private]

Definition of OccurrencesFactory class.

Author:
Alexandre Copertino Jardim <alexcj@dpi.inpe.br>
Date:
2006-03-21
Id:
OccurrencesFactory.cpp 5628 2012-11-07 18:45:44Z rdg

LICENSE INFORMATION

Copyright © 2006 INPE Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/copyleft/gpl.html

Definition at line 102 of file OccurrencesFactory.hh.

Referenced by instance().


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