Flow123d
main.h
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2007 Technical University of Liberec. All rights reserved.
4  *
5  * Please make a following refer to Flow123d on your project site if you use the program for any purpose,
6  * especially for academic research:
7  * Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
8  *
9  * This program is free software; you can redistribute it and/or modify it under the terms
10  * of the GNU General Public License version 3 as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with this program; if not,
17  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
18  *
19  *
20  * $Id$
21  * $Revision$
22  * $LastChangedBy$
23  * $LastChangedDate$
24  *
25  * @file
26  * @brief ???
27  *
28  */
29 
30 #include <string>
31 #include "input/input_type.hh"
32 #include "input/accessors.hh"
34 
35 using namespace std;
36 
37 #ifndef MAIN_H
38 #define MAIN_H
39 
40 
41 
42 class Application : public ApplicationBase {
43 public:
44  /// Root of the Input::Type tree. Description of whole input structure.
46 
47  /// Application constructor.
48  Application(int argc, char ** argv);
49 
50  /**
51  * Displays program version and build info.
52  * Pass version information to Profiler.
53  *
54  * TODO: Split these two functionalities.
55  */
56  void display_version();
57 
58  /**
59  * Read main input file
60  *
61  * Returns accessor to the root Record.
62  */
63  Input::Record read_input();
64 
65  /// Destructor
66  virtual ~Application();
67 
68 protected:
69 
70  /**
71  * Run application.
72  *
73  * Read input and solve problem.
74  */
75  virtual void run();
76 
77  /**
78  * Check pause_after_run flag defined in input file.
79  */
80  virtual void after_run();
81 
82  /**
83  * Parse command line parameters.
84  * @param[in] argc command line argument count
85  * @param[in] argv command line arguments
86  */
87  virtual void parse_cmd_line(const int argc, char ** argv);
88 
89 private:
90 
91  /// directory of main input file (used to resolve relative paths of other input files)
93  /// filename of main input file
95 
97  char ** passed_argv_;
98 
99  /// Description of possible command line arguments.
101 
102  /// If true, we do output of profiling information.
104 
105  /// root input record
107 };
108 
109 
110 
111 
112 #endif
113 
114 //-----------------------------------------------------------------------------
115 // vim: set cindent:
116