]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Update MultipleParameterLoop::read_input to cb72c13 2546/head
authorMatthias Maier <tamiko@43-1.org>
Sat, 23 Apr 2016 00:24:47 +0000 (19:24 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sat, 23 Apr 2016 00:29:40 +0000 (19:29 -0500)
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
source/base/parameter_handler.cc

index fb1aa1735c103a71f0f34785233ed75f88545060..aff602e6fd5e9b92325aa908dd8a74660f195c43 100644 (file)
@@ -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 <tt>read_input</tt> functions implemented by
    * ParameterHandler, this is the only one overridden with new behavior by
    * this class. This is because the other two <tt>read_input</tt> 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
index 7aefd994c3a685ee890c7161de1f0edc09c19063..bd98002cfe922e389247e4a0e6aa3fb168ef4e66 100644 (file)
@@ -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;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.