IODA Bundle
CountTool.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 odc_CountTool_H
12 #define odc_CountTool_H
13 
14 #include "odc/tools/Tool.h"
15 
16 namespace odc {
17 namespace tool {
18 
19 class CountTool : public Tool {
20 public:
21  CountTool (int argc, char *argv[]);
22 
23  static size_t rowCount(const eckit::PathName &);
24 
25  void run();
26 
27  static void help(std::ostream &o)
28  {
29  o << "Counts number of rows in files";
30  }
31 
32  static void usage(const std::string& name, std::ostream &o)
33  {
34  o << name << " <file.odb>";
35  }
36 
37 private:
38 // No copy allowed
41 };
42 
43 } // namespace tool
44 } // namespace odc
45 
46 #endif
CountTool(int argc, char *argv[])
Definition: CountTool.cc:22
CountTool(const CountTool &)
static void usage(const std::string &name, std::ostream &o)
Definition: CountTool.h:32
static size_t rowCount(const eckit::PathName &)
Definition: CountTool.cc:24
CountTool & operator=(const CountTool &)
static void help(std::ostream &o)
Definition: CountTool.h:27
std::string name()
Definition: Tool.h:34
Definition: ColumnInfo.h:23