MCPcopy Create free account
hub / github.com/AnetaTexler/FaceBlit / serialize

Function serialize

VS/include/dlib/array2d/array2d_kernel.h:378–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376 typename mem_manager
377 >
378 void serialize (
379 const array2d<T,mem_manager>& item,
380 std::ostream& out
381 )
382 {
383 try
384 {
385 // The reason the serialization is a little funny is because we are trying to
386 // maintain backwards compatibility with an older serialization format used by
387 // dlib while also encoding things in a way that lets the array2d and matrix
388 // objects have compatible serialization formats.
389 serialize(-item.nr(),out);
390 serialize(-item.nc(),out);
391
392 item.reset();
393 while (item.move_next())
394 serialize(item.element(),out);
395 item.reset();
396 }
397 catch (serialization_error& e)
398 {
399 throw serialization_error(e.info + "\n while serializing object of type array2d");
400 }
401 }
402
403 template <
404 typename T,

Callers

nothing calls this directly

Calls 5

serialization_errorClass · 0.50
nrMethod · 0.45
ncMethod · 0.45
resetMethod · 0.45
move_nextMethod · 0.45

Tested by

no test coverage detected