| 124 | } |
| 125 | |
| 126 | void |
| 127 | DocNodeList::packToBuffer(string &buffer) const |
| 128 | { |
| 129 | int32_t n_elements = size(); |
| 130 | buffer.append(reinterpret_cast<const char *>(&n_elements), sizeof(n_elements)); |
| 131 | for (const auto &iter : *this) { |
| 132 | iter.pack(buffer); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | bool |
| 137 | DocNodeList::unpack(const char *data, int data_len) |