Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::functionEntries::messageDirective
28
29Description
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
44SourceFiles
45 messageDirective.C
46
47\*---------------------------------------------------------------------------*/
48
49#ifndef functionEntries_messageDirective_H
50#define functionEntries_messageDirective_H
51
52#include "functionEntry.H"
53
54// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55
56namespace Foam
57{
58namespace functionEntries
59{
61/*---------------------------------------------------------------------------*\
62 Class messageDirective Declaration
63\*---------------------------------------------------------------------------*/
64
66:
67 public functionEntry
68{
69 // Private Member Functions
70
71 //- Evaluate
72 static bool evaluate(const dictionary& parentDict, Istream& is);
73
74
75public:
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,
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// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
entry(const keyType &keyword)
Construct from keyword.
Definition entry.C:62
Expands string content and reports as a message on stderr.
static bool execute(const dictionary &parentDict, primitiveEntry &entry, Istream &is)
Execute in a primitiveEntry context.
functionEntry(const functionEntry &)=delete
No copy construct.
primitiveEntry(const keyType &key)
Construct from keyword and no tokens.
Namespace for containing a functionEntry.
Definition calcEntry.C:33
Namespace for OpenFOAM.