Flow123d
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
flow123d
src
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
"
33
#include "
system/application_base.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.
45
static
Input::Type::Record
input_type
;
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
/**
90
* Split path to directory (part up to last DIR_SEPARATOR excluded) and filename.
91
* Directory is set to "." if no DIR_SEPARATOR is found.
92
*/
93
void
split_path(
const
string
& path,
string
& directory,
string
& file_name);
94
95
private
:
96
97
/// directory of main input file (used to resolve relative paths of other input files)
98
string
main_input_dir_
;
99
/// filename of main input file
100
string
main_input_filename_
;
101
102
int
passed_argc_
;
103
char
**
passed_argv_
;
104
105
/// Description of possible command line arguments.
106
string
program_arguments_desc_
;
107
108
/// If true, we do output of profiling information.
109
bool
use_profiler
;
110
111
/// root input record
112
Input::Record
root_record
;
113
};
114
115
116
117
118
#endif
119
120
//-----------------------------------------------------------------------------
121
// vim: set cindent:
122
Generated on Thu May 29 2014 23:14:48 for Flow123d by
1.8.4