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
a6134d25
Commit
a6134d25
authored
Oct 11, 2010
by
Andrew Heather
Browse files
ENH: Added dictName() functions to return last cmpt of scoped name
parent
9de20a66
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/dictionary/dictionary.H
View file @
a6134d25
...
...
@@ -111,6 +111,23 @@ public:
{
return
name_
;
}
//- Return the local dictionary name (final part of scoped name)
const
word
dictName
()
const
{
const
word
scopedName
=
name_
.
name
();
string
::
size_type
i
=
scopedName
.
rfind
(
':'
);
if
(
i
==
scopedName
.
npos
)
{
return
scopedName
;
}
else
{
return
scopedName
.
substr
(
i
+
1
,
scopedName
.
npos
);
}
}
};
...
...
src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H
View file @
a6134d25
...
...
@@ -106,13 +106,19 @@ public:
// Member functions
//- Return the dictionary name
//- Return the local dictionary name (final part of scoped name)
const
word
dictName
()
const
{
return
dictionary
::
dictName
();
}
//- Return the dictionary name (scoped, e.g. dictA::dictB::dictC)
const
fileName
&
name
()
const
{
return
dictionary
::
name
();
}
//- Return the dictionary name
//- Return the dictionary name
(scoped, e.g. dictA::dictB::dictC)
fileName
&
name
()
{
return
dictionary
::
name
();
...
...
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