Use new parser in common output interface

Since EclipseWriter can now take a Deck instead of an EclipseGridParser
the interface can be changed to take this type instead.
This commit is contained in:
Roland Kaufmann 2014-04-01 14:03:09 +02:00
parent f07fac6b83
commit 5371e19d19
2 changed files with 6 additions and 6 deletions

View File

@ -48,7 +48,7 @@ private:
/// Psuedo-constructor, can appear in template
template <typename Format> unique_ptr <OutputWriter>
create (const ParameterGroup& params,
std::shared_ptr <EclipseGridParser> parser,
std::shared_ptr <const Deck> parser,
std::shared_ptr <const UnstructuredGrid> grid) {
return unique_ptr <OutputWriter> (new Format (params, parser, grid));
}
@ -61,7 +61,7 @@ create (const ParameterGroup& params,
/// to the list below!
typedef map <const char*, unique_ptr <OutputWriter> (*)(
const ParameterGroup&,
std::shared_ptr <EclipseGridParser>,
std::shared_ptr <const Deck>,
std::shared_ptr <const UnstructuredGrid>)> map_t;
map_t FORMATS = {
{ "output_ecl", &create <EclipseWriter> },
@ -71,7 +71,7 @@ map_t FORMATS = {
unique_ptr <OutputWriter>
OutputWriter::create (const ParameterGroup& params,
std::shared_ptr <EclipseGridParser> parser,
std::shared_ptr <const Deck> parser,
std::shared_ptr <const UnstructuredGrid> grid) {
// allocate a list which will be filled with writers. this list
// is initially empty (no output).

View File

@ -27,7 +27,7 @@ struct UnstructuredGrid;
namespace Opm {
// forward declaration
class EclipseGridParser;
class Deck;
namespace parameter { class ParameterGroup; }
class SimulatorState;
class SimulatorTimer;
@ -43,7 +43,7 @@ class WellState;
* \example
* \code{.cpp}
* ParameterGroup params (argc, argv, false);
* auto parser = std::make_shared <EclipseGridParser> (
* auto parser = std::make_shared <const Deck> (
* params.get <string> ("deck_filename"));
*
* std::unique_ptr <OutputWriter> writer =
@ -108,7 +108,7 @@ public:
*/
static std::unique_ptr <OutputWriter>
create (const parameter::ParameterGroup& params,
std::shared_ptr <EclipseGridParser> parser,
std::shared_ptr <const Deck> parser,
std::shared_ptr <const UnstructuredGrid> grid);
};