Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitri Naumov
ogs
Commits
eb53811b
Commit
eb53811b
authored
6 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[PL/Out] Impl. begin() and end() used by for-range-loop.
parent
96f07b22
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ProcessLib/Output/SecondaryVariable.cpp
+14
-2
14 additions, 2 deletions
ProcessLib/Output/SecondaryVariable.cpp
ProcessLib/Output/SecondaryVariable.h
+3
-0
3 additions, 0 deletions
ProcessLib/Output/SecondaryVariable.h
with
17 additions
and
2 deletions
ProcessLib/Output/SecondaryVariable.cpp
+
14
−
2
View file @
eb53811b
...
@@ -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
());
}
}
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/Output/SecondaryVariable.h
+
3
−
0
View file @
eb53811b
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment