]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove a truly old remnant in the ParameterHandler class that has never been used.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 7 Jun 2004 14:37:43 +0000 (14:37 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 7 Jun 2004 14:37:43 +0000 (14:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@9390 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/parameter_handler.h
deal.II/base/source/parameter_handler.cc
deal.II/doc/news/c-5.0.html

index 50920c0f25ac425db8e37be78aa242edfcf210bc..c179b0cc42738d5b2895bfe711498b1fa6ba5ab6 100644 (file)
@@ -1288,14 +1288,7 @@ class ParameterHandler
     virtual bool read_input_from_string (const char *s);
 
                                     /**
-                                     * Return status of this object:
-                                     * <tt>true</tt>=clean or
-                                     * <tt>false</tt>=error occured.
-                                     */
-    bool ok () const;
-
-                                    /**
-                                     * clear status bit and contents.
+                                     * Clear all contents.
                                      */
     void clear ();
 
@@ -1504,11 +1497,6 @@ class ParameterHandler
                    << "Error when trying to convert the following string: " << arg1);
     
   private:
-                                    /**
-                                     * ok bit
-                                     */
-    bool status;
-
                                     /**
                                      * Whatever is in a section:
                                      * map of entry names together with
@@ -2059,14 +2047,5 @@ class MultipleParameterLoop : public ParameterHandler
 };
 
 
-/*------------------------------ Inline functions ------------------------------*/
-
-inline
-bool
-ParameterHandler::ok() const
-{
-  return status;
-}
-
 
 #endif
index e65eb980c586be3873ebaa569b99ff241be5c5cc..e4ea78be530c0c41a26a15e78f9bd853820bf0cc 100644 (file)
@@ -31,7 +31,6 @@
 # include <limits>
 #endif
 
-//TODO[WB]: Remove the "status" flag -- it's only a remnant of the DiffPack past of this class and doesn't really serve any useful purpose any more
 
 namespace Patterns
 {  
@@ -542,11 +541,6 @@ namespace Patterns
 
 
 
-ParameterHandler::ParameterHandler ()
-                :
-               status(true) {}
-
-
 
 ParameterHandler::~ParameterHandler ()
 {}
@@ -559,13 +553,15 @@ bool ParameterHandler::read_input (std::istream &input)
 
   std::string line;
   int lineno=0;
+  bool status = true;
+  
   while (input) 
     {
       ++lineno;
       getline (input, line);
       if (!scan_line (line, lineno)) 
        status = false;
-    };
+    }
 
   return status;
 }
@@ -608,7 +604,8 @@ bool ParameterHandler::read_input_from_string (const char *s)
                                   // to make all lines equal
   if (input[input.length()-1] != '\n')
     input += '\n';
-  
+
+  bool status = true;
   while (input.size() != 0) 
     {
                                       // get one line from Input (=s)
@@ -629,8 +626,6 @@ bool ParameterHandler::read_input_from_string (const char *s)
 
 void ParameterHandler::clear ()
 {
-  status = true;
-
   subsection_path.clear ();
   defaults.entries.clear ();
   changed_entries.entries.clear ();
@@ -1283,7 +1278,7 @@ const ParameterHandler::Section* ParameterHandler::get_present_changed_subsectio
     {
       sec = sec->subsections[*SecName];
       ++SecName;
-    };
+    }
 
   return sec;
 }
@@ -1293,8 +1288,7 @@ const ParameterHandler::Section* ParameterHandler::get_present_changed_subsectio
 unsigned int 
 ParameterHandler::memory_consumption () const
 {
-  return (MemoryConsumption::memory_consumption (status) +
-         MemoryConsumption::memory_consumption (subsection_path) +
+  return (MemoryConsumption::memory_consumption (subsection_path) +
          MemoryConsumption::memory_consumption (defaults) +
          MemoryConsumption::memory_consumption (changed_entries));
 }
index 15d2422e37cd31bbfd090f657ef8667dbf7285e9..bbfd42ede167b67a8a2073b95fec7217e31cf1b3 100644 (file)
@@ -68,6 +68,18 @@ inconvenience this causes.
 <h3>base</h3>
 
 <ol>
+  <li> <p>
+       Removed: The <code
+       class="class">ParameterHandler</code> class contained a remnant from
+       back in 1997 when it was modeled after a similar class in DiffPack: it
+       had a <code>status</code> flag that one could obtain via the <code
+       class="member">ok</code> function. It was never really used for
+       anything, and has thus finally been removed. The <code
+       class="member">ok</code> is consequently gone as well.
+       <br> 
+       (WB 2004/06/06)
+       </p>
+
   <li> <p>
        New: An object of the new <code
        class="class">ConditionalOStream</code> class allows to print

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.