]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add length to output of List::description.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Dec 2002 20:25:25 +0000 (20:25 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Dec 2002 20:25:25 +0000 (20:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@6802 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/parameter_handler.cc

index 8e8f17161f222fe8ab6dd9d81dccd473d86140fa..6bc062282c9056815c08450dd4a42857c835e289 100644 (file)
@@ -357,7 +357,21 @@ namespace Patterns
 
   std::string List::description () const
   {
-    return std::string("list of <") + pattern->description() + ">";
+#ifdef HAVE_STD_STRINGSTREAM
+    std::ostringstream description;    
+#else
+    std::ostrstream description;
+#endif
+       
+    description << "list of <" << pattern->description() << ">" 
+                << " of length " << min_elements << "..." << max_elements
+                << " (inclusive)";
+
+#ifndef HAVE_STD_STRINGSTREAM
+    description << std::ends;
+#endif
+
+    return description.str();
   };
 
 

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.