/** * Deserialize the IR_BIN_DATA data type. * * @param ar The archive from where deserialize the data type. */ void serialize(iarchive& ar) { _cnt = ar.list_length(); _ar.clear(); for (uint i = 0; i < _cnt; ++i) { uint pos; uint end; pos = ar.position(); ar.position(pos + 4); end = ar.list_length(); end += ar.position(); _ar.append(ar.begin() + pos, ar.begin() + end); ar.position(end); } }
/** * Deserialize the Vendor_IE data type. * * @param ar The archive from where deserialize the data type. */ bool serialize(iarchive& ar) { uint32 type; uint pos = ar.position(); uint len; ar & type; if (!is_vendor_ie(type)) { ar.position(pos); return false; } ar & len; _data.size(len); std::copy(ar.current(), ar.current() + len, _data.get()); ar.advance(len); return true; }
/** * Deserialize the LIST(Vendor_IE) data type. * * @param ar The archive from where deserialize the data type. */ void serialize(iarchive& ar) { base::clear(); while (ar.position() < ar.length()) { base::resize(base::size() + 1); vendor_ie& ie = base::back(); if (!ie.serialize(ar)) { base::resize(base::size() - 1); return; } } }