FV3 Bundle
Application.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2009-2016 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 OOPS_RUNS_APPLICATION_H_
12 #define OOPS_RUNS_APPLICATION_H_
13 
14 #include <iostream>
15 #include <string>
16 
17 #include "oops/util/Printable.h"
18 
19 namespace eckit {
20  class Configuration;
21 }
22 
23 namespace oops {
24 
25 // -----------------------------------------------------------------------------
26 
27 class Application : public util::Printable {
28  public:
30  virtual ~Application() {}
31  virtual int execute(const eckit::Configuration &) const = 0;
32 
33  private:
34  virtual std::string appname() const = 0;
35  virtual void print(std::ostream & os) const {os << appname();}
36 };
37 
38 // -----------------------------------------------------------------------------
39 
40 } // namespace oops
41 
42 #endif // OOPS_RUNS_APPLICATION_H_
virtual std::string appname() const =0
The namespace for the main oops code.
virtual ~Application()
Definition: Application.h:30
virtual void print(std::ostream &os) const
Definition: Application.h:35
virtual int execute(const eckit::Configuration &) const =0