mirror of https://github.com/SeanOMik/libki.git
dml: Don't serialize/deserialize NOXFER fields
This commit is contained in:
parent
19f7cd1334
commit
605819b539
|
@ -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)
|
||||||
|
{
|
||||||
|
if ((*it)->is_transferable())
|
||||||
(*it)->write_to(ostream);
|
(*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)
|
||||||
|
{
|
||||||
|
if ((*it)->is_transferable())
|
||||||
(*it)->read_from(istream);
|
(*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)
|
||||||
|
{
|
||||||
|
if ((*it)->is_transferable())
|
||||||
size += (*it)->get_size();
|
size += (*it)->get_size();
|
||||||
|
}
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue