| 135 | |
| 136 | template <class T> |
| 137 | void Serializer::serialize(const T &obj) |
| 138 | { |
| 139 | // We can't set write to stream.end() here because the call |
| 140 | // to stream.resize() below may invalidate iterators |
| 141 | int writeIndex = stream.size(); |
| 142 | |
| 143 | // Increase the size of the stream so it can hold the object |
| 144 | stream.resize(stream.size() + get_size(obj)); |
| 145 | |
| 146 | write = stream.begin() + writeIndex; |
| 147 | |
| 148 | _serialize(obj); |
| 149 | } |
| 150 | |
| 151 | template <class T> |
| 152 | void Serializer::_serialize(const T &obj) |
no outgoing calls
no test coverage detected