42 #include <boost/math/special_functions/fpclassify.hpp> 71 const String& replacement =
"_",
84 const String& replacement =
"_",
139 typename std::enable_if<std::is_arithmetic<typename std::remove_reference<T>::type>::value,
SVOutStream&>::type
operator<<(
const T& value)
141 if (!newline_)
static_cast<std::ostream&
>(*this) << sep_;
142 else newline_ =
false;
143 static_cast<std::ostream&
>(*this) <<
String(value);
149 typename std::enable_if<!std::is_arithmetic<typename std::remove_reference<T>::type>::value,
SVOutStream&>::type
operator<<(
const T& value)
152 static_cast<std::ostream &
>(*this) << sep_;
155 static_cast<std::ostream &
>(*this) << value;
168 bool modifyStrings(
bool modify);
172 template <
typename NumericT>
175 if ((boost::math::isfinite)(thing))
return operator<<(thing);
177 bool old = modifyStrings(
false);
178 if ((boost::math::isnan)(thing))
A more convenient string class.
Definition: String.h:58
const double c
Definition: Constants.h:214
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
std::stringstream ss_
Stream for testing if a manipulator is "std::endl".
Definition: SVOutStream.h:220
QuotingMethod
How to handle embedded quotes when quoting strings.
Definition: String.h:81
bool newline_
Are we at the beginning of a line? (Otherwise, insert separator before next item.) ...
Definition: SVOutStream.h:217
String nan_
String to use for NaN values.
Definition: SVOutStream.h:205
Definition: SVOutStream.h:47
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
String replacement_
Replacement for separator.
Definition: SVOutStream.h:202
std::ofstream * ofs_
internal file stream when C'tor is called with a filename
Definition: SVOutStream.h:196
String inf_
String to use for Inf values.
Definition: SVOutStream.h:208
SVOutStream & writeValueOrNan(NumericT thing)
Write a numeric value or "nan"/"inf"/"-inf", if applicable (would not be needed for Linux) ...
Definition: SVOutStream.h:173
String sep_
Separator string.
Definition: SVOutStream.h:199
std::enable_if< std::is_arithmetic< typename std::remove_reference< T >::type >::value, SVOutStream & >::type operator<<(const T &value)
Definition: SVOutStream.h:139
Stream class for writing to comma/tab/...-separated values files.
Definition: SVOutStream.h:56
Newline
custom newline indicator
Definition: SVOutStream.h:47
String::QuotingMethod quoting_
String quoting method.
Definition: SVOutStream.h:211
std::enable_if<!std::is_arithmetic< typename std::remove_reference< T >::type >::value, SVOutStream & >::type operator<<(const T &value)
Generic stream output operator (for non-character-based types)
Definition: SVOutStream.h:149
bool modify_strings_
On/off switch for modification of strings.
Definition: SVOutStream.h:214