From b254ba00614cf231738e821bb862d666afcff42d Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 22 Apr 2016 19:24:47 -0500 Subject: [PATCH] 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 --- include/deal.II/base/parameter_handler.h | 7 ++++++- source/base/parameter_handler.cc | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) 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; -- 2.39.5