diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index eabbe79dc1..76cfb3487d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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 diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 36552f80cf..553951a2f8 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -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 diff --git a/src/OpenFOAM/db/dictionary/formattingEntry/formattingEntry.C b/src/OpenFOAM/db/dictionary/formattingEntry/formattingEntry.C new file mode 100644 index 0000000000..a8f2d0f189 --- /dev/null +++ b/src/OpenFOAM/db/dictionary/formattingEntry/formattingEntry.C @@ -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 . + +\*---------------------------------------------------------------------------*/ + +#include "formattingEntry.H" + +void Foam::formattingEntry::write(Ostream& os) const +{ + // os << "This is a formattingEntry\n"; + primitiveEntry::write(os, true); +} + +// ************************************************************************* // diff --git a/src/OpenFOAM/db/dictionary/formattingEntry/formattingEntry.H b/src/OpenFOAM/db/dictionary/formattingEntry/formattingEntry.H new file mode 100644 index 0000000000..b01de8c636 --- /dev/null +++ b/src/OpenFOAM/db/dictionary/formattingEntry/formattingEntry.H @@ -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 . + +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 clone(const dictionary&) const + { + return autoPtr(new formattingEntry(*this)); + } + + + // Member Functions + + //- Write + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //