OpenFOAM
v2312
The open source CFD toolbox
messageDirective.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2021 OpenCFD Ltd.
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
Class
27
Foam::functionEntries::messageDirective
28
29
Description
30
Expands string content and reports as a message on stderr.
31
32
For example,
33
\verbatim
34
T
35
{
36
solver PBiCG;
37
preconditioner DILU;
38
tolerance 1e-10;
39
relTol 0;
40
#message "using solver: $solver"
41
}
42
\endverbatim
43
44
SourceFiles
45
messageDirective.C
46
47
\*---------------------------------------------------------------------------*/
48
49
#ifndef functionEntries_messageDirective_H
50
#define functionEntries_messageDirective_H
51
52
#include "
functionEntry.H
"
53
54
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55
56
namespace
Foam
57
{
58
namespace
functionEntries
59
{
60
61
/*---------------------------------------------------------------------------*\
62
Class messageDirective Declaration
63
\*---------------------------------------------------------------------------*/
64
65
class
messageDirective
66
:
67
public
functionEntry
68
{
69
// Private Member Functions
70
71
//- Evaluate
72
static
bool
evaluate(
const
dictionary
& parentDict,
Istream
& is);
73
74
75
public
:
76
77
//- Execute in a primitiveEntry context.
78
// Reports message string (after expansion) - does not alter entry.
79
static
bool
execute
80
(
81
const
dictionary
& parentDict,
82
primitiveEntry
&
entry
,
83
Istream
& is
84
);
85
86
//- Execute in a sub-dict context.
87
// Reports message string (after expansion) - does not alter dictionary.
88
static
bool
execute
(
dictionary
& parentDict,
Istream
& is);
89
};
90
91
92
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93
94
}
// End namespace functionEntries
95
}
// End namespace Foam
96
97
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98
99
#endif
100
101
// ************************************************************************* //
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition:
dictionary.H:129
functionEntry.H
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition:
Istream.H:57
Foam::primitiveEntry
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read...
Definition:
primitiveEntry.H:64
Foam::functionEntry
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
Definition:
functionEntry.H:63
Foam::functionEntries::messageDirective
Expands string content and reports as a message on stderr.
Definition:
messageDirective.H:60
Foam::functionEntries::messageDirective::execute
static bool execute(const dictionary &parentDict, primitiveEntry &entry, Istream &is)
Execute in a primitiveEntry context.
Definition:
messageDirective.C:127
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:26
Foam::entry
A keyword and a list of tokens is an 'entry'.
Definition:
entry.H:63
src
OpenFOAM
db
dictionary
functionEntries
message
messageDirective.H
Generated by
1.8.14