OpenFOAM
dev
The OpenFOAM Foundation
namedUnitConversion.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2024 OpenFOAM Foundation
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Class
25
Foam::namedUnitConversion
26
27
Description
28
...
29
30
SourceFiles
31
...
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef namedUnitConversion_H
36
#define namedUnitConversion_H
37
38
#include "
unitConversion.H
"
39
40
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42
namespace
Foam
43
{
44
45
// Forward declaration of classes
46
class
Istream;
47
class
Ostream;
48
class
entry;
49
50
// Forward declaration of friend functions and operators
51
class
namedUnitConversion;
52
Istream&
operator>>
(Istream&, namedUnitConversion&);
53
Ostream&
operator<<
(Ostream&,
const
namedUnitConversion&);
54
55
/*---------------------------------------------------------------------------*\
56
Class namedUnitConversion Declaration
57
\*---------------------------------------------------------------------------*/
58
59
class
namedUnitConversion
60
:
61
public
unitConversion
62
{
63
private
:
64
65
// Private Data
66
67
//- The name
68
string
name_;
69
70
71
// Private Member Functions
72
73
//- Read the name
74
void
readName(
const
entry
&
e
);
75
76
//- Read the name
77
void
readName(
const
word
& keyword,
const
dictionary
&);
78
79
80
public
:
81
82
// Static Data Members
83
84
//- Run time type information
85
ClassName
(
"namedUnitConversion"
);
86
87
88
// Constructors
89
90
//- Construct from name
91
namedUnitConversion
(
const
string
&);
92
93
//- Copy constructor
94
namedUnitConversion
(
const
namedUnitConversion
&) =
default
;
95
96
//- Move constructor
97
namedUnitConversion
(
namedUnitConversion
&&) =
default
;
98
99
100
// Member Functions
101
102
//- Update
103
void
read
(
const
word
& keyword,
const
dictionary
&);
104
105
//- Update if found in the dictionary
106
bool
readIfPresent
(
const
word
& keyword,
const
dictionary
&);
107
108
109
// IOstream Operators
110
111
//- Read from stream
112
friend
Istream
&
operator>>
(
Istream
&,
namedUnitConversion
&);
113
114
//- Write to stream
115
friend
Ostream
&
operator<<
(
Ostream
&,
const
namedUnitConversion
&);
116
};
117
118
119
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120
121
}
// End namespace Foam
122
123
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124
125
#endif
126
127
// ************************************************************************* //
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition:
Istream.H:60
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition:
Ostream.H:57
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition:
dictionary.H:162
Foam::entry
A keyword and a list of tokens is an 'entry'.
Definition:
entry.H:68
Foam::namedUnitConversion
...
Definition:
namedUnitConversion.H:61
Foam::namedUnitConversion::ClassName
ClassName("namedUnitConversion")
Run time type information.
Foam::namedUnitConversion::readIfPresent
bool readIfPresent(const word &keyword, const dictionary &)
Update if found in the dictionary.
Definition:
namedUnitConversionIO.C:70
Foam::namedUnitConversion::read
void read(const word &keyword, const dictionary &)
Update.
Definition:
namedUnitConversionIO.C:58
Foam::namedUnitConversion::operator>>
friend Istream & operator>>(Istream &, namedUnitConversion &)
Read from stream.
Foam::namedUnitConversion::operator<<
friend Ostream & operator<<(Ostream &, const namedUnitConversion &)
Write to stream.
Foam::namedUnitConversion::namedUnitConversion
namedUnitConversion(const string &)
Construct from name.
Definition:
namedUnitConversion.C:39
Foam::unitConversion
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
Definition:
unitConversion.H:68
Foam::word
A class for handling words, derived from string.
Definition:
word.H:62
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.H:214
Foam::e
const doubleScalar e
Definition:
doubleScalar.H:106
Foam::operator>>
Istream & operator>>(Istream &, pistonPointEdgeData &)
Definition:
pistonPointEdgeData.C:41
Foam::operator<<
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
Definition:
fvConstraints.C:330
unitConversion.H
src
OpenFOAM
unitConversion
namedUnitConversion.H
Generated by
1.9.1