dml: Don't serialize/deserialize NOXFER fields

This commit is contained in:
Joshua Scott 2018-03-30 21:13:23 +01:00
parent 19f7cd1334
commit 605819b539
1 changed files with 12 additions and 3 deletions

View File

@ -47,20 +47,29 @@ namespace dml
void Record::write_to(std::ostream &ostream) const void Record::write_to(std::ostream &ostream) const
{ {
for (auto it = m_fields.begin(); it != m_fields.end(); ++it) for (auto it = m_fields.begin(); it != m_fields.end(); ++it)
(*it)->write_to(ostream); {
if ((*it)->is_transferable())
(*it)->write_to(ostream);
}
} }
void Record::read_from(std::istream &istream) void Record::read_from(std::istream &istream)
{ {
for (auto it = m_fields.begin(); it != m_fields.end(); ++it) for (auto it = m_fields.begin(); it != m_fields.end(); ++it)
(*it)->read_from(istream); {
if ((*it)->is_transferable())
(*it)->read_from(istream);
}
} }
size_t Record::get_size() const size_t Record::get_size() const
{ {
size_t size = 0; size_t size = 0;
for (auto it = m_fields.begin(); it != m_fields.end(); ++it) for (auto it = m_fields.begin(); it != m_fields.end(); ++it)
size += (*it)->get_size(); {
if ((*it)->is_transferable())
size += (*it)->get_size();
}
return size; return size;
} }