40 #include <boost/math/special_functions/fpclassify.hpp> 69 const String& replacement =
"_",
82 const String& replacement =
"_",
137 typename std::enable_if<std::is_arithmetic<typename std::remove_reference<T>::type>::value,
SVOutStream&>::type
operator<<(
const T& value)
139 if (!newline_)
static_cast<std::ostream&
>(*this) << sep_;
140 else newline_ =
false;
141 static_cast<std::ostream&
>(*this) <<
String(value);
147 typename std::enable_if<!std::is_arithmetic<typename std::remove_reference<T>::type>::value,
SVOutStream&>::type
operator<<(
const T& value)
150 static_cast<std::ostream &
>(*this) << sep_;
153 static_cast<std::ostream &
>(*this) << value;
166 bool modifyStrings(
bool modify);
170 template <
typename NumericT>
173 if ((boost::math::isfinite)(thing))
return operator<<(thing);
175 bool old = modifyStrings(
false);
176 if ((boost::math::isnan)(thing))
operator<<(nan_);
String sep_
Separator string.
Definition: SVOutStream.h:188
std::stringstream ss_
Stream for testing if a manipulator is "std::endl".
Definition: SVOutStream.h:209
std::ofstream * ofs_
internal file stream when C'tor is called with a filename
Definition: SVOutStream.h:185
bool modify_strings_
On/off switch for modification of strings.
Definition: SVOutStream.h:203
Newline
custom newline indicator
Definition: SVOutStream.h:45
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:147
bool newline_
Are we at the beginning of a line? (Otherwise, insert separator before next item.) ...
Definition: SVOutStream.h:206
String::QuotingMethod quoting_
String quoting method.
Definition: SVOutStream.h:200
String nan_
String to use for NaN values.
Definition: SVOutStream.h:194
std::enable_if< std::is_arithmetic< typename std::remove_reference< T >::type >::value, SVOutStream & >::type operator<<(const T &value)
Definition: SVOutStream.h:137
SVOutStream & writeValueOrNan(NumericT thing)
Write a numeric value or "nan"/"inf"/"-inf", if applicable (would not be needed for Linux) ...
Definition: SVOutStream.h:171
String replacement_
Replacement for separator.
Definition: SVOutStream.h:191
A more convenient string class.
Definition: String.h:58
QuotingMethod
How to handle embedded quotes when quoting strings.
Definition: String.h:81
String inf_
String to use for Inf values.
Definition: SVOutStream.h:197
Definition: SVOutStream.h:45
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Stream class for writing to comma/tab/...-separated values files.
Definition: SVOutStream.h:54