Commit ae6eeff9 authored by kraus's avatar kraus

much simpler solution

parent 5c4029a0
......@@ -38,43 +38,7 @@ void SDDSColumn::writeValue(std::ostream& os) const {
"value for column '" + name_m + "' isn't set");
}
std::set<std::ios_base::fmtflags> independentFlags({std::ios_base::boolalpha,
std::ios_base::showbase,
std::ios_base::showpoint,
std::ios_base::showpos,
std::ios_base::skipws,
std::ios_base::unitbuf,
std::ios_base::uppercase});
std::set<std::ios_base::fmtflags> numericalBase({std::ios_base::dec,
std::ios_base::hex,
std::ios_base::oct});
std::set<std::ios_base::fmtflags> floatFormat({std::ios_base::fixed,
std::ios_base::scientific});
std::set<std::ios_base::fmtflags> adjustmentFlags({std::ios_base::internal,
std::ios_base::left,
std::ios_base::right});
for (std::ios_base::fmtflags flag: independentFlags){
if (writeFlags_m & flag) {
os.setf(flag);
}
}
for (std::ios_base::fmtflags flag: numericalBase) {
if (writeFlags_m & flag) {
os.setf(flag, std::ios_base::basefield);
}
}
for (std::ios_base::fmtflags flag: floatFormat) {
if (writeFlags_m & flag) {
os.setf(flag, std::ios_base::floatfield);
}
}
for (std::ios_base::fmtflags flag: adjustmentFlags) {
if (writeFlags_m & flag) {
os.setf(flag, std::ios_base::adjustfield);
}
}
os.flags(writeFlags_m);
os.precision(writePrecision_m);
os << value_m << std::setw(10) << "\t";
set_m = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment