MI - Fimex
CDMFileReaderFactory.h
Go to the documentation of this file.
1 /*
2  * Fimex, CDMFileReaderFactory.h
3  *
4  * (C) Copyright 2010, met.no
5  *
6  * Project Info: https://wiki.met.no/fimex/start
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21  * USA.
22  *
23  * Created on: May 5, 2010
24  * Author: Heiko Klein
25  */
26 
27 #ifndef CDMFILEREADERFACTORY_H_
28 #define CDMFILEREADERFACTORY_H_
29 
30 #include <boost/shared_ptr.hpp>
31 #include <vector>
32 #include <string>
33 #include "fimex/XMLInput.h"
34 #include "fimex/deprecated.h"
35 #include "fimex/CDMconstants.h"
36 
37 namespace MetNoFimex
38 {
39 
40 // forward decl.
41 class CDMReader;
42 
50 {
51 public:
63  static mifi_filetype detectFileType(const std::string& fileName);
64 
80  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>());
85  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>());
101  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>());
105  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>());
106 
115 
116 };
117 
118 }
119 
120 
121 #endif /* CDMFILEREADERFACTORY_H_ */
mifi_filetype
Definition: CDMconstants.h:52
basic_string< char > string
static mifi_filetype detectFileType(const std::string &fileName)
detect the filetype of a input-file
Definition: C_CDMReader.h:35
Definition: CDMFileReaderFactory.h:49
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.
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
Definition: XMLInput.h:49