From ab78d40ea3dfb86ff8c4c0ca8063f21f1f6b64e5 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 3 Dec 2002 20:25:25 +0000 Subject: [PATCH] Add length to output of List::description. git-svn-id: https://svn.dealii.org/trunk@6802 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/parameter_handler.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/deal.II/base/source/parameter_handler.cc b/deal.II/base/source/parameter_handler.cc index 8e8f17161f..6bc062282c 100644 --- a/deal.II/base/source/parameter_handler.cc +++ b/deal.II/base/source/parameter_handler.cc @@ -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(); }; -- 2.39.5