51 label padding = (12 - label(key.size()));
58 while (--padding > 0);
83 static char paddedVersion[39] =
"";
91 std::size_t len = apiValue.length();
97 std::memset(paddedVersion,
' ', 38);
98 std::memcpy(paddedVersion, apiValue.c_str(), len);
99 paddedVersion[38] =
'\0';
103 "/*--------------------------------";
117 "----------------------------------*\\\n"
121 " OpenFOAM: The Open Source CFD Toolbox |\n"
122 "| \\\\ / O peration |"
123 " Version: " << paddedVersion <<
"|\n"
125 " Website: www.openfoam.com |\n"
126 "| \\\\/ M anipulation |"
128 "\\*-----------------------------------------"
129 "----------------------------------*/\n";
138 "// * * * * * * * * * * * * * * * * * "
139 "* * * * * * * * * * * * * * * * * * * * //\n";
148 "// *****************************************"
149 "******************************** //\n";
161 const word& objectType,
175 if (objectType.empty())
189 if (metaDataDict && !metaDataDict->empty())
200 const word& objectType,
215 if (objectType.empty())
229 if (metaDataDict && !metaDataDict->empty())
231 dict.
add(
"meta", *metaDataDict);
241 const word& objectType
247 <<
"No stream open for write" <<
nl
282 return IOobject::writeHeader(
os, this->
type());
289 const word& objectType,
310 IOobject::writeHeader(
dict, this->
type(), streamOpt);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
static bool bannerEnabled() noexcept
Status of output file banner.
static Ostream & writeDivider(Ostream &os)
Write the standard file section divider.
static Ostream & writeEndDivider(Ostream &os)
Write the standard end file divider.
static Ostream & writeBanner(Ostream &os, const bool noSyntaxHint=false)
Write the standard OpenFOAM file/dictionary banner.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
const fileName & local() const noexcept
Read access to local path component.
static void writeHeaderContent(Ostream &os, const IOobject &io, const word &objectType, const dictionary *metaDataDict=nullptr)
const fileName & instance() const noexcept
Read access to instance path component.
const string & note() const noexcept
Return the optional note.
bool writeHeader(Ostream &os) const
Write header with current type()
The IOstreamOption is a simple container for options an IOstream can normally have.
versionNumber version() const noexcept
Get the stream version.
streamFormat format() const noexcept
Get the current stream format.
bool good() const noexcept
True if next operation might succeed.
InfoProxy< IOstream > info() const
Return info proxy.
virtual Ostream & write(const char c)
Write character.
virtual void indent()
Add indentation characters.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & endBlock()
Write end block group.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void writeEntry(Ostream &os) const
Write sub-dictionary with its dictName as its header.
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
@ END_STATEMENT
End entry [isseparator].
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define InfoInFunction
Report an information message using Foam::Info.
const std::string buildArch
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void writeHeaderEntry(Ostream &os, const word &key, const T &value)
constexpr char nl
The newline '\n' character (0x0a)