MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / deserialize

Function deserialize

benchmarks/dlib/queue/queue_kernel_2.h:188–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186 typename mem_manager
187 >
188 void deserialize (
189 queue_kernel_2<T,block_size,mem_manager>& item,
190 std::istream& in
191 )
192 {
193 try
194 {
195 item.clear();
196 unsigned long size;
197 deserialize(size,in);
198 T temp;
199 for (unsigned long i = 0; i < size; ++i)
200 {
201 deserialize(temp,in);
202 item.enqueue(temp);
203 }
204 }
205 catch (serialization_error& e)
206 {
207 item.clear();
208 throw serialization_error(e.info + "\n while deserializing object of type queue_kernel_2");
209 }
210 }
211
212// ----------------------------------------------------------------------------------------
213// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

serialization_errorClass · 0.85
clearMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected