diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index f1196852bf..cb3b03b00f 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -477,7 +477,8 @@ public: // Write - void write(Ostream&, bool subDict=true) const; + //- Write dictionary, normally with sub-dictionary formatting + void write(Ostream&, const bool subDict=true) const; // Member Operators diff --git a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H index 050840c5e4..7713e503af 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H +++ b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -146,7 +146,7 @@ public: //- Return non-const access to dictionary dictionary& dict(); - // Write + //- Write void write(Ostream&) const; //- Return info proxy. diff --git a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntryIO.C b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntryIO.C index b090188a0d..2477f0450b 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntryIO.C +++ b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntryIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.H b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.H index 6edf2c621c..01f08cea5b 100644 --- a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.H +++ b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -168,6 +168,9 @@ public: //- Write void write(Ostream&) const; + //- Write, optionally with contents only (no keyword, etc) + void write(Ostream&, const bool contentsOnly) const; + //- Return info proxy. // Used to print token information to a stream InfoProxy info() const diff --git a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C index fa9a50efdb..33c3dc8ff7 100644 --- a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C +++ b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C @@ -210,31 +210,43 @@ Foam::primitiveEntry::primitiveEntry(const keyType& key, Istream& is) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::primitiveEntry::write(Ostream& os) const +void Foam::primitiveEntry::write(Ostream& os, const bool contentsOnly) const { - os.writeKeyword(keyword()); + if (!contentsOnly) + { + os.writeKeyword(keyword()); + } for (label i=0; iwrite(os, false); } diff --git a/src/OpenFOAM/primitives/strings/stringOps/stringOps.H b/src/OpenFOAM/primitives/strings/stringOps/stringOps.H index d9756a2705..6d416dd6e8 100644 --- a/src/OpenFOAM/primitives/strings/stringOps/stringOps.H +++ b/src/OpenFOAM/primitives/strings/stringOps/stringOps.H @@ -128,19 +128,15 @@ namespace stringOps string& inplaceTrimLeft(string&); //- Return string trimmed of trailing whitespace - // NOT IMPLEMENTED string trimRight(const string&); //- Trim trailing whitespace inplace - // NOT IMPLEMENTED string& inplaceTrimRight(string&); //- Return string trimmed of leading and trailing whitespace - // NOT IMPLEMENTED string trim(const string&); //- Trim leading and trailing whitespace inplace - // NOT IMPLEMENTED string& inplaceTrim(string&);