INT: dictionary formattingEntry

- this is a primitiveEntry for holding purely formatting content
  such as blank lines, comments, other placeholders etc
This commit is contained in:
Sergey Lesnik
2023-03-01 15:29:44 +01:00
committed by Mark Olesen
parent b1f9fe9d79
commit 5bcf70081a
4 changed files with 122 additions and 0 deletions

View File

@ -33,6 +33,7 @@ It is likely incomplete...
- Alexander Kabat vel Job
- Thilo Knacke
- Shannon Leakey
- Sergey Lesnik
- Tommaso Lucchini
- Graham Macpherson
- Alexey Matveichev
@ -59,6 +60,7 @@ It is likely incomplete...
- Vuko Vukcevic
- Yi Wang
- Norbert Weber
- Gregor Weiss
- Volker Weissmann
- Henry Weller
- Niklas Wikstrom

View File

@ -316,6 +316,9 @@ primitiveEntry = $(dictionary)/primitiveEntry
$(primitiveEntry)/primitiveEntry.C
$(primitiveEntry)/primitiveEntryIO.C
formattingEntry = $(dictionary)/formattingEntry
$(formattingEntry)/formattingEntry.C
dictionaryEntry = $(dictionary)/dictionaryEntry
$(dictionaryEntry)/dictionaryEntry.C
$(dictionaryEntry)/dictionaryEntryIO.C

View File

@ -0,0 +1,36 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2023 Sergey Lesnik
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "formattingEntry.H"
void Foam::formattingEntry::write(Ostream& os) const
{
// os << "This is a formattingEntry\n";
primitiveEntry::write(os, true);
}
// ************************************************************************* //

View File

@ -0,0 +1,81 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2023 Sergey Lesnik
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::formattingEntry
Description
A dictionary entry writing only contents by default, used to save
formatting symbols for the final output
\*---------------------------------------------------------------------------*/
#ifndef Foam_formattingEntry_H
#define Foam_formattingEntry_H
#include "primitiveEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class formattingEntry Declaration
\*---------------------------------------------------------------------------*/
class formattingEntry
:
public primitiveEntry
{
public:
// Constructors
//- Inherit all constructors from primitiveEntry
using primitiveEntry::primitiveEntry;
virtual autoPtr<entry> clone(const dictionary&) const
{
return autoPtr<entry>(new formattingEntry(*this));
}
// Member Functions
//- Write
virtual void write(Ostream& os) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //