fix for dump
This commit is contained in:
@@ -291,9 +291,7 @@ void SingleDataField::dump(ostream& output)
|
|||||||
else if (m_partType == pt_slaveData)
|
else if (m_partType == pt_slaveData)
|
||||||
output << "s";
|
output << "s";
|
||||||
output << FIELD_SEPARATOR;
|
output << FIELD_SEPARATOR;
|
||||||
if (!m_dataType->dump(output, m_length)) { // no divisor appended
|
m_dataType->dump(output, m_length);
|
||||||
output << FIELD_SEPARATOR; // no value list, no divisor
|
|
||||||
}
|
|
||||||
dumpString(output, m_unit);
|
dumpString(output, m_unit);
|
||||||
dumpString(output, m_comment);
|
dumpString(output, m_comment);
|
||||||
}
|
}
|
||||||
@@ -536,10 +534,6 @@ void ValueListDataField::dump(ostream& output)
|
|||||||
if (!m_dataType->dump(output, m_length)) { // no divisor appended
|
if (!m_dataType->dump(output, m_length)) { // no divisor appended
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (map<unsigned int, string>::iterator it = m_values.begin(); it != m_values.end(); it++) {
|
for (map<unsigned int, string>::iterator it = m_values.begin(); it != m_values.end(); it++) {
|
||||||
if (first)
|
|
||||||
first = false;
|
|
||||||
else
|
|
||||||
output << VALUE_SEPARATOR;
|
|
||||||
output << static_cast<unsigned>(it->first) << "=" << it->second;
|
output << static_cast<unsigned>(it->first) << "=" << it->second;
|
||||||
}
|
}
|
||||||
} // TODO else does not fit into CSV format!
|
} // TODO else does not fit into CSV format!
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dump the type identifier with the specified length and optionally the
|
* Dump the type identifier with the specified length and optionally the
|
||||||
* divisor to the output.
|
* divisor to the output (@a FIELD_SEPARATOR is always appended!).
|
||||||
* @param output the @a ostream to dump to.
|
* @param output the @a ostream to dump to.
|
||||||
* @param length the number of symbols to read/write.
|
* @param length the number of symbols to read/write.
|
||||||
* @return true when a non-default divisor was written to the output.
|
* @return true when a non-default divisor was written to the output.
|
||||||
|
|||||||
Reference in New Issue
Block a user