Loading...
Searching...
No Matches
dictionaryListEntry.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) 2016 OpenFOAM Foundation
9 Copyright (C) 2017 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::dictionaryListEntry
29
30Description
31 Read/write List of dictionaries.
32
33 The List entries get stored in a
34 dictionary which itself is stored in the parent dictionary with
35 keyword 'entryDDD' where DDD is the position in the parent dictionary.
36 The printing is again in List format - the keyword is only printed as
37 comment. Can be used to e.g. manipulate polyMesh/boundary files.
38
39SourceFiles
40 dictionaryListEntryIO.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef Foam_dictionaryListEntry_H
45#define Foam_dictionaryListEntry_H
46
47#include "dictionaryEntry.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54// Forward Declarations
55
58
59template<>
61
63/*---------------------------------------------------------------------------*\
64 Class dictionaryListEntry Declaration
65\*---------------------------------------------------------------------------*/
66
68:
69 public dictionaryEntry
70{
71public:
72
73 // Generated Methods
74
75 //- No copy construct
77
78
79 // Constructors
80
81 //- Construct from the parent dictionary and Istream
82 dictionaryListEntry(const dictionary& parentDict, Istream& is);
83
84 //- Construct as copy for the given parent dictionary
86 (
87 const dictionary& parentDict,
88 const dictionaryListEntry& dictEnt
89 );
90
91 autoPtr<entry> clone(const dictionary& parentDict) const
92 {
93 return autoPtr<entry>(new dictionaryListEntry(parentDict, *this));
94 }
95
96
97 // Member Functions
98
99 //- Write
100 virtual void write(Ostream& os) const;
101
102 //- Return info proxy,
103 //- used to print token information to a stream
104 InfoProxy<dictionaryListEntry> info() const noexcept { return *this; }
105
106
107 // Ostream Operator
108
110};
111
112
113// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115} // End namespace Foam
116
117// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119#endif
120
121// ************************************************************************* //
A helper class for outputting values to Ostream.
Definition InfoProxy.H:49
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
dictionaryEntry(const dictionaryEntry &)=delete
No copy construct.
Read/write List of dictionaries.
autoPtr< entry > clone(const dictionary &parentDict) const
Construct on freestore as copy with reference to the.
dictionaryListEntry(const dictionaryListEntry &)=delete
No copy construct.
InfoProxy< dictionaryListEntry > info() const noexcept
Return info proxy, used to print token information to a stream.
friend Ostream & operator<<(Ostream &os, const dictionaryListEntry &e)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
autoPtr< dictionary > clone() const
Construct and return clone.
Definition dictionary.C:165
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
const direction noexcept
Definition scalarImpl.H:265
runTime write()
volScalarField & e