An wrapper for Ostream that outputs content in JSON format. More...
Public Member Functions | |
TypeName ("JSONformatter") | |
Declare type-name. More... | |
JSONformatter (Ostream &os) | |
Construct from Ostream. More... | |
virtual | ~JSONformatter ()=default |
Destructor. More... | |
virtual Ostream & | write (const bool val) |
virtual Ostream & | write (const int32_t val) |
virtual Ostream & | write (const int64_t val) |
virtual Ostream & | write (const float val) |
virtual Ostream & | write (const double val) |
virtual Ostream & | write (const word &str) |
virtual Ostream & | write (const std::string &str) |
virtual Ostream & | write (const char *str) |
virtual Ostream & | writeKeyword (const keyType &keyword) |
Write JSON keyword. More... | |
virtual Ostream & | writeDict (const dictionary &dict) |
Write OpenFOAM dictionary to JSON dictionary. More... | |
template<class Type > | |
Ostream & | writeEntry (const word &keyword, const Type &val) |
Write JSON keyword-value pair (for primitive types) More... | |
An wrapper for Ostream that outputs content in JSON format.
Definition at line 47 of file JSONformatter.H.
|
explicit |
Construct from Ostream.
Definition at line 81 of file JSONformatter.C.
|
virtualdefault |
Destructor.
TypeName | ( | "JSONformatter" | ) |
Declare type-name.
|
virtual |
Definition at line 203 of file JSONformatter.C.
Referenced by JSONformatter::writeEntry().
|
virtual |
Definition at line 210 of file JSONformatter.C.
|
virtual |
Definition at line 217 of file JSONformatter.C.
|
virtual |
Definition at line 224 of file JSONformatter.C.
|
virtual |
Definition at line 231 of file JSONformatter.C.
|
virtual |
Definition at line 238 of file JSONformatter.C.
References Ostream::writeQuoted().
|
virtual |
Definition at line 244 of file JSONformatter.C.
References Ostream::writeQuoted().
|
virtual |
Definition at line 250 of file JSONformatter.C.
References Foam::constant::universal::c.
|
virtual |
Write JSON keyword.
Definition at line 90 of file JSONformatter.C.
References Ostream::writeQuoted().
|
virtual |
Write OpenFOAM dictionary to JSON dictionary.
Definition at line 98 of file JSONformatter.C.
References token::BEGIN_LIST, token::BEGIN_SQR, Foam::decrIndent(), dict, Foam::constant::electromagnetic::e, token::END_LIST, token::END_SQR, forAll, Foam::incrIndent(), Foam::indent(), Foam::nl, and Ostream::writeQuoted().
Referenced by caseInfo::write().
Write JSON keyword-value pair (for primitive types)
Definition at line 110 of file JSONformatter.H.
References JSONformatter::write(), and Ostream::writeQuoted().