]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
added "yes" and "no" to the possible values for bool values as read in by ParameterHa...
authorrschulz <rschulz@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Jul 2005 11:12:56 +0000 (11:12 +0000)
committerrschulz <rschulz@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Jul 2005 11:12:56 +0000 (11:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@11177 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/parameter_handler.h
deal.II/base/source/parameter_handler.cc
deal.II/doc/news/changes.html

index c97c055d873c026ada5bab42c42d9d40a0c8f63d..27489b2b3ae6eafc00928125ad0988a92d892577 100644 (file)
@@ -1371,7 +1371,10 @@ class ParameterHandler
                                     /**
                                      * Return value of entry
                                      * <tt>entry_string</tt> as <tt>bool</tt>.
-                                     */
+                                      * The entry may be "true" or "yes" 
+                                      * for <tt>true</tt>, "false" or
+                                      * "no" for <tt>false</tt> respectively.
+                                      */
     bool           get_bool (const std::string &entry_string) const;
 
                                     /**
index 8c5cdae1492143084c4775149386b6eaeaa90f56..117b20a86b7cf5a80020cc722061eb46e737aa57 100644 (file)
@@ -786,8 +786,8 @@ bool ParameterHandler::get_bool (const std::string &entry_string) const
 {
   std::string s = get(entry_string);
 
-  AssertThrow ((s=="true") || (s=="false"), ExcConversionError(s));
-  if (s=="true")
+  AssertThrow ((s=="true") || (s=="false") || (s=="yes") || (s=="no"), ExcConversionError(s));
+  if (s=="true" || s=="yes")
     return true;
   else
     return false;
index f7a36431b0f4a576f5c0266b25f1d302b56f96bb..96c2d020484cead7b60cd2cb9015ef7b13e8a30d 100644 (file)
@@ -251,6 +251,14 @@ inconvenience this causes.
 <h3>base</h3>
 
 <ol>
+  <li> <p>
+       Changed: <code>ParameterHandler::get_bool()</code> only accepted
+       "true" or "false" as boolean values, now it also considers "yes"
+       and "no" as "true" and "false" respectively.
+       <br>
+       (Ralf B. Schulz, 2005/07/19)
+       </p>
+       
   <li> <p>
        Removed: The <code>write_multigrid</code> flag in <code
        class="member">DataOutBase::DXFlags</code> 

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.