Skip to content
Snippets Groups Projects
Commit eb53811b authored by Tom Fischer's avatar Tom Fischer
Browse files

[PL/Out] Impl. begin() and end() used by for-range-loop.

parent 96f07b22
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,18 @@ void SecondaryVariableCollection::addSecondaryVariable( ...@@ -38,6 +38,18 @@ void SecondaryVariableCollection::addSecondaryVariable(
} }
} }
std::map<std::string, std::string>::const_iterator
SecondaryVariableCollection::begin()
{
return _map_external_to_internal.cbegin();
}
std::map<std::string, std::string>::const_iterator
SecondaryVariableCollection::end()
{
return _map_external_to_internal.cend();
}
SecondaryVariable const& SecondaryVariableCollection::get( SecondaryVariable const& SecondaryVariableCollection::get(
std::string const& external_name) std::string const& external_name)
{ {
...@@ -46,7 +58,7 @@ SecondaryVariable const& SecondaryVariableCollection::get( ...@@ -46,7 +58,7 @@ SecondaryVariable const& SecondaryVariableCollection::get(
if (it == _map_external_to_internal.cend()) if (it == _map_external_to_internal.cend())
{ {
OGS_FATAL( OGS_FATAL(
"A secondary variable with external name `%s' has not been set up.", "A secondary variable with external name '%s' has not been set up.",
external_name.c_str()); external_name.c_str());
} }
...@@ -56,7 +68,7 @@ SecondaryVariable const& SecondaryVariableCollection::get( ...@@ -56,7 +68,7 @@ SecondaryVariable const& SecondaryVariableCollection::get(
if (it2 == _configured_secondary_variables.end()) if (it2 == _configured_secondary_variables.end())
{ {
OGS_FATAL( OGS_FATAL(
"A secondary variable with internal name `%s' has not been set up.", "A secondary variable with internal name '%s' has not been set up.",
internal_name.c_str()); internal_name.c_str());
} }
......
...@@ -132,6 +132,9 @@ public: ...@@ -132,6 +132,9 @@ public:
//! Returns the secondary variable with the given external name. //! Returns the secondary variable with the given external name.
SecondaryVariable const& get(std::string const& external_name); SecondaryVariable const& get(std::string const& external_name);
std::map<std::string, std::string>::const_iterator begin();
std::map<std::string, std::string>::const_iterator end();
private: private:
//! Maps external variable names to internal ones. //! Maps external variable names to internal ones.
//! The external variable names are used, e.g., for output. //! The external variable names are used, e.g., for output.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment