#include <deal.II/base/config.h>
+#include <deal.II/base/utilities.h>
#include <deal.II/base/exceptions.h>
#include <deal.II/base/subscriptor.h>
#include <deal.II/base/point.h>
+#include <deal.II/base/parameter_handler.h>
#include <deal.II/base/std_cxx14/memory.h>
#include <boost/core/demangle.hpp>
-#include <boost/any.hpp>
-
#include <map>
#include <vector>
const std::unique_ptr<PatternBase> &p = Convert<T>::to_pattern()) = delete;
};
+ /**
+ * Declare a new entry in @p prm with name @p entry, set its default value
+ * to the content of the variable @p parameter, and create an action
+ * that will fill @p parameter with updated values when a file is parsed,
+ * or the entry is set to a new value.
+ *
+ * By default, the pattern to use is obtained by calling the function
+ * PatternsTools::Convert<T>::to_pattern(), but a custom one can be used.
+ */
+ template <class ParameterType>
+ void add_parameter(const std::string &entry,
+ ParameterType ¶meter,
+ ParameterHandler &prm,
+ const std::string &documentation = std::string(),
+ const Patterns::PatternBase &pattern = *Convert<ParameterType>::to_pattern());
+
/**
* @addtogroup Exceptions
* @{
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 1998 - 2017 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-
-#include <deal.II/base/parameter_handler.h>
-#include <deal.II/base/patterns_tools.h>
-#include <deal.II/base/utilities.h>
-#include <deal.II/base/memory_consumption.h>
-#include <deal.II/base/std_cxx14/memory.h>
-
-DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
-#include <boost/core/demangle.hpp>
-DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
-
-//#include <fstream>
-//#include <iostream>
-//#include <iomanip>
-//#include <cstdlib>
-//#include <algorithm>
-//#include <sstream>
-//#include <cctype>
-//#include <limits>
-//#include <cstring>
-
-
-DEAL_II_NAMESPACE_OPEN
-
-
-
-//TODO[WB]: various functions here could be simplified by using namespace Utilities
-
-namespace PatternsTools
-{
- std::string default_list_separator(unsigned int rank)
- {
- static std::array<std::string, 5> seps = {{" ", "," , ";" , "|" , "%"}};
- AssertThrow(rank < seps.size(), ExcMessage("I don't know what to use for such "
- "high rank. Bailing out."));
- return seps[rank];
- }
-
-
- std::string default_map_separator(unsigned int rank)
- {
- static std::array<std::string, 5> seps = {{" ", ":" , "=" , "@" , "#"}};
- AssertThrow(rank < seps.size(), ExcMessage("I don't know what to use for such "
- "high rank. Bailing out."));
- return seps[rank];
- }
-}
-
-DEAL_II_NAMESPACE_CLOSE