From 152cb41d71ebd6a7161e8fdb9b388ce70a2d5b27 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Tue, 18 Jul 2017 21:03:13 +0200 Subject: [PATCH] Added getters to Patterns::Map --- include/deal.II/base/parameter_handler.h | 20 ++++++++++++++++++ source/base/parameter_handler.cc | 26 ++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/include/deal.II/base/parameter_handler.h b/include/deal.II/base/parameter_handler.h index 6d9219ff99..d0806054dc 100644 --- a/include/deal.II/base/parameter_handler.h +++ b/include/deal.II/base/parameter_handler.h @@ -578,6 +578,26 @@ namespace Patterns */ std::size_t memory_consumption () const; + /** + * Return a reference to the key pattern. + */ + const PatternBase &get_key_pattern() const; + + /** + * Return a reference to the value pattern. + */ + const PatternBase &get_value_pattern() const; + + /** + * Return the separator of the map entries. + */ + const std::string &get_separator() const; + + /** + * Return the key-value separator. + */ + const std::string &get_key_value_separator() const; + /** * @addtogroup Exceptions * @{ diff --git a/source/base/parameter_handler.cc b/source/base/parameter_handler.cc index e5194e785c..5aab9be8f7 100644 --- a/source/base/parameter_handler.cc +++ b/source/base/parameter_handler.cc @@ -924,6 +924,32 @@ namespace Patterns + const PatternBase &Map::get_key_pattern() const + { + return *key_pattern; + } + + + + const PatternBase &Map::get_value_pattern() const + { + return *value_pattern; + } + + + + const std::string &Map::get_separator() const + { + return separator; + } + + + const std::string &Map::get_key_value_separator() const + { + return key_value_separator; + } + + const char *MultipleSelection::description_init = "[MultipleSelection"; -- 2.39.5