Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include "vsl_vector_io.h"
00008 #include <vsl/vsl_binary_io.h>
00009 #include <vcl_iostream.h>
00010 #include <vcl_deprecated.h>
00011
00012
00013
00014
00015
00016
00017
00018 void vsl_b_read_vec_vec_bool_old(vsl_b_istream& is, vcl_vector<vcl_vector<bool> >& v)
00019 {
00020 if (!is) return;
00021
00022 unsigned int n, m;
00023 short ver;
00024 vsl_b_read(is, ver);
00025 switch (ver)
00026 {
00027 case 1:
00028 vsl_b_read(is, n);
00029 v.resize(n);
00030 for (unsigned int i=0; i<n; ++i)
00031 {
00032 vsl_b_read(is, m);
00033 v[i].resize(m);
00034 for (unsigned int j=0; j<m; ++j)
00035 {
00036 bool b;
00037 vsl_b_read(is, b);
00038 v[i][j] = b;
00039 }
00040 }
00041 break;
00042
00043 default:
00044 vcl_cerr << "I/O ERROR: vsl_b_read(vsl_b_istream&, vcl_vector<vcl_vector<T> >&)\n"
00045 << " Unknown version number "<< ver << '\n';
00046 is.is().clear(vcl_ios::badbit);
00047 return;
00048 }
00049 }
00050
00051
00052