MI - Fimex
|
#include <fimex/CDMFileReaderFactory.h>
Static Public Member Functions | |
static mifi_filetype | detectFileType (const std::string &fileName) |
detect the filetype of a input-file More... | |
static boost::shared_ptr< CDMReader > | create (int fileType, const std::string &fileName, const std::string &configFile="", const std::vector< std::string > &args=std::vector< std::string >()) |
Factory for CDMReader of input-files. More... | |
static boost::shared_ptr< CDMReader > | create (const std::string &fileType, const std::string &fileName, const std::string &configFile="", const std::vector< std::string > &args=std::vector< std::string >()) |
same as the other create(), but with a fileType string More... | |
static boost::shared_ptr< CDMReader > | create (int fileType, const std::string &fileName, const XMLInput &configXML, const std::vector< std::string > &args=std::vector< std::string >()) |
Factory for CDMReader of input-files. More... | |
static boost::shared_ptr< CDMReader > | create (const std::string &fileType, const std::string &fileName, const XMLInput &configXML, const std::vector< std::string > &args=std::vector< std::string >()) |
same as the other create(), but with a fileType string More... | |
static void | parseGribArgs (const std::vector< std::string > &args, std::vector< std::pair< std::string, std::string > > &members, std::vector< std::string > &files) |
parse special arguments for grib-files More... | |
helper class to simplify file-reader detection and creation
|
static |
Factory for CDMReader of input-files.
This function tries to create a reader by filetype mifi_filetype. The optional arguments are defined by the different readers. Use default objects (empty string, empty vector) if arguments are not desired.
fileType | one of mifi_filetype, possibly read by detectFileType(). To get a CDMReaderWriter, use MIFI_FILETYPE_NETCDF|MIFI_FILETYPE_RW. |
fileName | name of input file (might start with glob: for grib or netcdf, e.g. glob:*.nc (joinExisting aggregation, see NcmlCDMReader.h) |
configFile | |
args | optional options for the CDMReader, e.g. for grib: additional message files |
CDMException | if type not compiled in, or creation fails |
|
static |
same as the other create(), but with a fileType string
|
static |
Factory for CDMReader of input-files.
This function tries to create a reader by filetype mifi_filetype. The optional arguments are defined by the different readers. Use default objects (empty string, empty vector) if arguments are not desired.
fileType | one of mifi_filetype, possibly read by detectFileType(). To get a CDMReaderWriter, use MIFI_FILETYPE_NETCDF|MIFI_FILETYPE_RW |
fileName | name of input file (might start with glob: for grib or netcdf, e.g. glob:*.nc (joinExisting aggregation, see NcmlCDMReader.h) |
configXML | config source |
args | optional options for the CDMReader |
CDMException | if type not compiled in, or creation fails |
|
static |
same as the other create(), but with a fileType string
|
static |
detect the filetype of a input-file
The detectFileType function uses heuristics (appendix, magic characters) to detect the filetype
fileName | input file |
if | file not found |
|
static |
parse special arguments for grib-files
args | list of arguments, e.g. combined –input.file –input.optional from fimex command-line |
members | return members as memberName/memberRegexp pairs |
files | retrun all input files |