28 #ifndef CASA_JSONOUT_H 29 #define CASA_JSONOUT_H 32 #include <casacore/casa/aips.h> 33 #include <casacore/casa/BasicSL/String.h> 34 #include <casacore/casa/Arrays/Array.h> 131 const String& indent=
" ");
152 template <
typename T>
168 template <
typename T>
void put (T value);
174 void put (
const char* value);
183 template <
typename T>
188 template <
typename T>
207 template <
typename T>
211 template <
typename T>
240 #ifndef CASACORE_NO_AUTO_TEMPLATES 241 #include <casacore/casa/Json/JsonOut.tcc> 242 #endif //# CASACORE_NO_AUTO_TEMPLATES void startNested(const String &name, const String &comment=String())
Start a nested structure; i.e., a field with a structured value.
void putNull()
Write a null value.
void putName(const String &name)
Write the name.
std::complex< Float > Complex
void writeComment(const String &comment)
Write a comment on a separate line.
String indentValue(const String &indent, const String &name) const
Get the indentation after a name.
void put(T value)
Put a scalar value with sufficient accuracy.
static String escapeString(const String &in)
Escape a double quote and backslash in a string.
void putArray(const Array< T > &value, const String &indent, Bool firstLine)
Put a line defining an array value.
void writeKV(const String &name, T value)
General function to write a key and value.
void endNested()
End a nested structure.
vector< Bool > itsFirstName
Class to fill a file or stream in JSON format.
std::complex< Double > DComplex
A holder for a value of any basic Casacore data type.
void end()
End a structure by clearing the indentation and writing a }.
void start(const String &commentStart=String(), const String &commentEnd=String(), const String &indent=" ")
Start a JSON structure by writing a { and setting the indentation.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
template <class T, class U> class vector;
JsonOut & operator=(const JsonOut &other)
Assignment cannot be used.
JsonOut()
The default constructor creates the output on stdout.
void write(const String &name, T value, const String &comment=String())
Write one or more lines defining a keyword-value pair, where value can be of any type including Array...
String: the storage and methods of handling collections of characters.
~JsonOut()
Close the stream.
this file contains all the compiler specific defines
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.