Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
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
Development
openfoam
Commits
622808c7
Commit
622808c7
authored
5 years ago
by
Mark OLESEN
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add empty() member for Enum
parent
e247e063
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OpenFOAM/primitives/enums/Enum.H
+4
-1
4 additions, 1 deletion
src/OpenFOAM/primitives/enums/Enum.H
src/OpenFOAM/primitives/enums/EnumI.H
+8
-1
8 additions, 1 deletion
src/OpenFOAM/primitives/enums/EnumI.H
with
12 additions
and
2 deletions
src/OpenFOAM/primitives/enums/Enum.H
+
4
−
1
View file @
622808c7
...
@@ -101,8 +101,11 @@ public:
...
@@ -101,8 +101,11 @@ public:
// Access
// Access
//- True if the enumeration list is empty.
inline
bool
empty
()
const
noexcept
;
//- The number of name/value pairs for the enumeration.
//- The number of name/value pairs for the enumeration.
inline
label
size
()
const
;
inline
label
size
()
const
noexcept
;
//- The list of enum names, in construction order. Same as toc()
//- The list of enum names, in construction order. Same as toc()
inline
const
List
<
word
>&
names
()
const
;
inline
const
List
<
word
>&
names
()
const
;
...
...
This diff is collapsed.
Click to expand it.
src/OpenFOAM/primitives/enums/EnumI.H
+
8
−
1
View file @
622808c7
...
@@ -28,7 +28,14 @@ License
...
@@ -28,7 +28,14 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
<
class
EnumType
>
template
<
class
EnumType
>
inline
Foam
::
label
Foam
::
Enum
<
EnumType
>::
size
()
const
inline
bool
Foam
::
Enum
<
EnumType
>::
empty
()
const
noexcept
{
return
keys_
.
empty
();
}
template
<
class
EnumType
>
inline
Foam
::
label
Foam
::
Enum
<
EnumType
>::
size
()
const
noexcept
{
{
return
keys_
.
size
();
return
keys_
.
size
();
}
}
...
...
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