Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
4d126bfe
Commit
4d126bfe
authored
May 10, 2017
by
Mark OLESEN
Browse files
ENH: add dictionary optionalSubDict() method as per .org change (20-Apr)
parent
cd8083eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/dictionary/dictionary.C
View file @
4d126bfe
...
...
@@ -743,6 +743,24 @@ Foam::dictionary Foam::dictionary::subOrEmptyDict
}
const
Foam
::
dictionary
&
Foam
::
dictionary
::
optionalSubDict
(
const
word
&
keyword
)
const
{
const
entry
*
entryPtr
=
lookupEntryPtr
(
keyword
,
false
,
true
);
if
(
entryPtr
)
{
return
entryPtr
->
dict
();
}
else
{
return
*
this
;
}
}
Foam
::
wordList
Foam
::
dictionary
::
toc
()
const
{
wordList
keys
(
size
());
...
...
src/OpenFOAM/db/dictionary/dictionary.H
View file @
4d126bfe
...
...
@@ -436,6 +436,10 @@ public:
const
bool
mustRead
=
false
)
const
;
//- Find and return a sub-dictionary if found
// otherwise return this dictionary
const
dictionary
&
optionalSubDict
(
const
word
&
keyword
)
const
;
//- Return the table of contents
wordList
toc
()
const
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment