X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fstlplus%2Fpersistence%2Fpersistent_matrix.tpp;fp=src%2Fstlplus%2Fpersistence%2Fpersistent_matrix.tpp;h=0000000000000000000000000000000000000000;hb=5846afb00833cc72fe72422ca896d2387c712cb4;hp=ac81f857fbf06bba73da6bcaafd266d1c5bfd2f7;hpb=a97500609dc3c1b11f9786d32bc458eb00de4c36;p=chaz%2Fyoink diff --git a/src/stlplus/persistence/persistent_matrix.tpp b/src/stlplus/persistence/persistent_matrix.tpp deleted file mode 100644 index ac81f85..0000000 --- a/src/stlplus/persistence/persistent_matrix.tpp +++ /dev/null @@ -1,49 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// - -// Author: Andy Rushton -// Copyright: (c) Southampton University 1999-2004 -// (c) Andy Rushton 2004-2009 -// License: BSD License, see ../docs/license.html - -//////////////////////////////////////////////////////////////////////////////// -#include "persistent_int.hpp" - -namespace stlplus -{ - - //////////////////////////////////////////////////////////////////////////////// - - template - void dump_matrix(dump_context& context, const matrix& data, - DT dump_fn) - throw(persistent_dump_failed) - { - unsigned rows = data.rows(); - unsigned cols = data.columns(); - dump_unsigned(context, rows); - dump_unsigned(context, cols); - for (unsigned r = 0; r < rows; r++) - for (unsigned c = 0; c < cols; c++) - dump_fn(context, data(r,c)); - } - - //////////////////////////////////////////////////////////////////////////////// - - template - void restore_matrix(restore_context& context, matrix& data, - RT restore_fn) - throw(persistent_restore_failed) - { - unsigned rows = 0; - restore_unsigned(context, rows); - unsigned cols = 0; - restore_unsigned(context, cols); - data.resize(rows,cols); - for (unsigned r = 0; r < rows; r++) - for (unsigned c = 0; c < cols; c++) - restore_fn(context, data(r,c)); - } - - //////////////////////////////////////////////////////////////////////////////// - -} // end namespace stlplus