IODA Bundle
ImportTool.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 1996-2012 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #ifndef ImportTool_H
12 #define ImportTool_H
13 
14 #include "eckit/filesystem/PathName.h"
15 
16 #include "odc/tools/Tool.h"
17 
18 namespace odc {
19 namespace tool {
20 
21 class ImportTool : public Tool {
22 public:
23  ImportTool (int argc, char *argv[]);
24 
25  void run();
26 
27  static void help(std::ostream &o);
28  static void usage(const std::string& name, std::ostream &o);
29 
30  static void importFile(const eckit::PathName& in, const eckit::PathName& out, const std::string& delimiter = defaultDelimiter());
31  static void filterAndImportFile(const eckit::PathName& in, const eckit::PathName& out, const std::string& sql, const std::string& delimiter = defaultDelimiter());
32 
33  static std::string defaultDelimiter() { return ","; }
34 
35 private:
36 // No copy allowed
39 };
40 
41 } // namespace tool
42 } // namespace odc
43 
44 #endif
45 
ImportTool(int argc, char *argv[])
Definition: ImportTool.cc:36
ImportTool(const ImportTool &)
static void importFile(const eckit::PathName &in, const eckit::PathName &out, const std::string &delimiter=defaultDelimiter())
Definition: ImportTool.cc:95
static void filterAndImportFile(const eckit::PathName &in, const eckit::PathName &out, const std::string &sql, const std::string &delimiter=defaultDelimiter())
Definition: ImportTool.cc:100
ImportTool & operator=(const ImportTool &)
static void usage(const std::string &name, std::ostream &o)
Definition: ImportTool.cc:47
static std::string defaultDelimiter()
Definition: ImportTool.h:33
static void help(std::ostream &o)
Definition: ImportTool.cc:43
std::string name()
Definition: Tool.h:34
Definition: ColumnInfo.h:23