28 #ifndef CASA_JSONOUT_H
29 #define CASA_JSONOUT_H
131 const String& indent=
" ");
152 template <
typename T>
169 template <
typename T>
void put (T value);
175 void put (
const char* value);
184 template <
typename T>
189 template <
typename T>
208 template <
typename T>
212 template <
typename T>
241 #ifndef CASACORE_NO_AUTO_TEMPLATES
242 #include <casacore/casa/Json/JsonOut.tcc>
243 #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.
void put(T value)
Put a scalar value with sufficient accuracy.
static String escapeString(const String &in)
Escape special characters (including control characters) 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.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
void endNested()
End a nested structure.
String indentValue(const String &indent, const String &name) const
Get the indentation after a name.
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.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.