From: Matthias Maier Date: Sat, 23 Apr 2016 00:24:47 +0000 (-0500) Subject: Bugfix: Update MultipleParameterLoop::read_input to cb72c13 X-Git-Tag: v8.5.0-rc1~1084^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b254ba00614cf231738e821bb862d666afcff42d;p=dealii.git Bugfix: Update MultipleParameterLoop::read_input to cb72c13 Fix a regression introduced by cb72c13 that changed the signature of ParameterHandler::read_input. In reference to #2526 Fixes #2545 --- diff --git a/include/deal.II/base/parameter_handler.h b/include/deal.II/base/parameter_handler.h index fb1aa1735c..aff602e6fd 100644 --- a/include/deal.II/base/parameter_handler.h +++ b/include/deal.II/base/parameter_handler.h @@ -2285,13 +2285,18 @@ public: * * Return whether the read was successful. * + * If non-empty @p last_line is provided, the ParameterHandler object + * will stop parsing lines after encountering @p last_line . + * This is handy when adding extra data that shall be parsed manually. + * * @note Of the three read_input functions implemented by * ParameterHandler, this is the only one overridden with new behavior by * this class. This is because the other two read_input functions * just reformat their inputs and then call this version. */ virtual bool read_input (std::istream &input, - const std::string &filename = "input file"); + const std::string &filename = "input file", + const std::string &last_line = ""); /** * Overriding virtual functions which are overloaded (like diff --git a/source/base/parameter_handler.cc b/source/base/parameter_handler.cc index 7aefd994c3..bd98002cfe 100644 --- a/source/base/parameter_handler.cc +++ b/source/base/parameter_handler.cc @@ -2829,11 +2829,12 @@ MultipleParameterLoop::~MultipleParameterLoop () bool MultipleParameterLoop::read_input (std::istream &input, - const std::string &filename) + const std::string &filename, + const std::string &last_line) { AssertThrow (input, ExcIO()); - bool x = ParameterHandler::read_input (input, filename); + bool x = ParameterHandler::read_input (input, filename, last_line); if (x) init_branches (); return x;