0.95.0-final
Finite Element Embedded Library and Language in C++
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
applicationxml.hpp
Go to the documentation of this file.
1
/* -*- mode: c++; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; show-trailing-whitespace: t -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2
3
This file is part of the Feel library
4
5
Author(s): Christophe Prud'homme <christophe.prudhomme@feelpp.org>
6
Date: 2009-03-24
7
8
Copyright (C) 2009-2011 Université de Grenoble 1
9
10
This library is free software; you can redistribute it and/or
11
modify it under the terms of the GNU Lesser General Public
12
License as published by the Free Software Foundation; either
13
version 3.0 of the License, or (at your option) any later version.
14
15
This library is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
Lesser General Public License for more details.
19
20
You should have received a copy of the GNU Lesser General Public
21
License along with this library; if not, write to the Free Software
22
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
*/
29
#ifndef __ApplicationXML_H
30
#define __ApplicationXML_H 1
31
32
#include <boost/lexical_cast.hpp>
33
34
#include <
feel/feelcore/application.hpp
>
35
36
#include <feel/feelcore/xmlparser.hpp>
37
38
namespace
Feel
39
{
47
class
ApplicationXML
:
public
Application
48
{
50
typedef
Application
super
;
51
public
:
52
53
57
58
enum
RunStatus
59
{
60
RUN_CONTINUE,
61
RUN_EXIT
62
};
63
64
66
70
71
73
77
79
ApplicationXML
(
int
argc,
char
** argv,
AboutData
const
& ad, po::options_description
const
& od );
81
ApplicationXML
(
ApplicationXML
const
& );
83
~ApplicationXML
();
84
86
90
92
ApplicationXML
&
operator=
(
ApplicationXML
const
& o );
94
98
99
101
105
106
108
112
113
ApplicationXML
& addOutput(
Output
const
& o )
114
{
115
M_outputs
.push_back( o );
116
return
*
this
;
117
}
118
ApplicationXML
& addParameter(
Parameter
const
& o )
119
{
120
M_params
.push_back( o );
121
return
*
this
;
122
}
123
124
template
<
typename
T>
125
ApplicationXML
& addOutputValue( T
const
&
val
)
126
{
127
std::ostringstream oss;
128
oss <<
val
;
129
M_output_values
.push_back( oss.str() );
130
return
*
this
;
131
}
132
133
template
<
typename
T>
134
ApplicationXML
& addParameterValue( T
const
& val )
135
{
136
char
sci_val[11];
137
sprintf( sci_val,
"%.5e"
,(
double
)val );
138
M_parameter_values
.push_back( std::string( sci_val ) );
139
return
*
this
;
140
}
141
142
virtual
RunStatus preProcessing();
143
144
virtual
void
postProcessing();
145
147
148
149
150
protected
:
151
153
std::vector<Parameter>
M_params
;
154
156
std::vector<Output>
M_outputs
;
157
159
std::vector<std::string>
M_parameter_values
;
160
162
std::vector<std::string>
M_output_values
;
163
164
165
private
:
166
167
};
168
}
// Feel
169
#endif
/* __ApplicationXML_H */
Generated on Sun Oct 20 2013 08:24:54 for Feel++ by
1.8.4