IT++ Logo
itfile.h
Go to the documentation of this file.
1 
29 #ifndef ITFILE_H
30 #define ITFILE_H
31 
32 #include <itpp/base/vec.h>
33 
34 #include <itpp/base/array.h>
35 #include <itpp/base/binfile.h>
36 #include <itpp/base/ittypes.h>
37 #include <itpp/itexports.h>
38 
39 
40 namespace itpp
41 {
42 
94 class ITPP_EXPORT it_file_base
95 {
96 public:
98  struct data_header {
100  uint64_t hdr_bytes;
102  uint64_t data_bytes;
104  uint64_t block_bytes;
106  std::string name;
108  std::string type;
110  std::string desc;
111  };
112 
113 protected:
115  struct file_header {
117  char magic[4];
119  char version;
120  };
122  static char file_magic[4];
124  static char file_version;
125 };
126 
127 
132 class ITPP_EXPORT it_ifile : public it_file_base
133 {
134 public:
136  it_ifile();
138  explicit it_ifile(const std::string& filename);
140  virtual ~it_ifile() { }
142  void open(const std::string& filename);
144  virtual void close();
146  bfstream& low_level() { return s; }
147 
149  bool read_check_file_header();
151  void read_data_header(it_file_base::data_header& h);
152 
154  void low_level_read(char& x);
156  void low_level_read(uint64_t& x);
158  void low_level_read(bool &x);
159 
161  void low_level_read(bin& x);
163  void low_level_read(short& x);
165  void low_level_read(int& x);
167  void low_level_read(float& x);
169  void low_level_read(double& x);
171  void low_level_read(std::complex<float>& x);
173  void low_level_read(std::complex<double>& x);
174 
176  void low_level_read(bvec& v);
178  void low_level_read(svec& v);
180  void low_level_read(ivec& v);
182  void low_level_read_lo(vec& v);
184  void low_level_read_hi(vec& v);
186  void low_level_read_lo(cvec& v);
188  void low_level_read_hi(cvec& v);
189 
191  void low_level_read(std::string& str);
192 
194  void low_level_read(bmat& m);
196  void low_level_read(smat& m);
198  void low_level_read(imat& m);
200  void low_level_read_lo(mat& m);
202  void low_level_read_hi(mat& m);
204  void low_level_read_lo(cmat& m);
206  void low_level_read_hi(cmat& m);
207 
209  void low_level_read(Array<bin>& v);
211  void low_level_read(Array<short>& v);
213  void low_level_read(Array<int>& v);
215  void low_level_read(Array<float>& v);
217  void low_level_read_lo(Array<double>& v);
219  void low_level_read_hi(Array<double>& v);
221  void low_level_read(Array<std::complex<float> >& v);
223  void low_level_read_lo(Array<std::complex<double> >& v);
225  void low_level_read_hi(Array<std::complex<double> >& v);
226 
228  bool seek(const std::string& name);
230  bool seek(int n);
232  void info(std::string& name, std::string& type, std::string& desc,
233  uint64_t& bytes);
234 
235 protected:
238 };
239 
240 
245 class ITPP_EXPORT it_file : public it_ifile
246 {
247 public:
249  typedef it_file& (*it_manip)(it_file&);
250 
252  it_file();
253 
260  explicit it_file(const std::string& filename, bool trunc = false);
261 
263  virtual ~it_file() { delete _strings;}
264 
271  void open(const std::string& filename, bool trunc = false);
272 
274  void close();
276  void flush();
277 
279  bfstream& low_level() { return s; }
280 
282  void set_low_precision(bool p = true) { low_prec = p; }
284  bool get_low_precision() const { return low_prec; }
285 
287  void set_next_name(const std::string& name,
288  const std::string& description = "")
289  { next_name() = name; next_desc() = description; }
290 
292  void write_file_header();
294  void write_data_header(const std::string& type, uint64_t size);
296  void write_data_header(const std::string& type, const std::string& name,
297  uint64_t size, const std::string& description = "");
298 
300  void low_level_write(char x);
302  void low_level_write(uint64_t x);
304  void low_level_write(bool x);
305 
307  void low_level_write(bin x);
309  void low_level_write(short x);
311  void low_level_write(int x);
313  void low_level_write(float x);
315  void low_level_write(double x);
317  void low_level_write(const std::complex<float>& x);
319  void low_level_write(const std::complex<double>& x);
320 
322  void low_level_write(const bvec& v);
324  void low_level_write(const svec& v);
326  void low_level_write(const ivec& v);
328  void low_level_write(const vec& v);
330  void low_level_write(const cvec& v);
331 
333  void low_level_write(const std::string& str);
334 
336  void low_level_write(const bmat& m);
338  void low_level_write(const smat& m);
340  void low_level_write(const imat& m);
342  void low_level_write(const mat& m);
344  void low_level_write(const cmat& m);
345 
347  void low_level_write(const Array<bin>& v);
349  void low_level_write(const Array<short>& v);
351  void low_level_write(const Array<int>& v);
353  void low_level_write(const Array<float>& v);
355  void low_level_write(const Array<double>& v);
357  void low_level_write(const Array<std::complex<float> >& v);
359  void low_level_write(const Array<std::complex<double> >& v);
360 
362  it_file& operator<<(it_manip func) { return (*func)(*this); }
363 
365  void remove(const std::string& name);
367  bool exists(const std::string& name);
369  void pack();
370 
371 protected:
373  void remove();
375  void write_data_header_here(const data_header& h);
376 
378  bool low_prec;
380  std::string& next_name() {return _strings->_next_name;}
382  std::string& next_desc() {return _strings->_next_desc;}
383 
384 private:
385  struct Strings_Holder
386  {
387  std::string _next_name;
388  std::string _next_desc;
389  std::string _fname;
390  Strings_Holder():_next_name(""),_next_desc(""),_fname(""){}
391  };
392  Strings_Holder* _strings;
393  // Name of the opened file. Needed by the pack() method.
394  std::string& fname() {return _strings->_fname;}
395 };
396 
397 
409 inline it_file& flush(it_file& f)
410 {
411  f.flush();
412  return f;
413 }
414 
428 class ITPP_EXPORT Name
429 {
430 public:
432  Name(const std::string& n, const std::string& d = ""): name(n), desc(d) {}
434  Name &operator=(const Name&) { return *this; }
436  const std::string& name;
438  const std::string& desc;
439 };
440 
441 
443 
444 
446 inline it_ifile& operator>>(it_ifile& f, const Name& s)
447 {
448  f.seek(s.name);
449  return f;
450 }
451 
453 inline it_file& operator<<(it_file& f, const Name& s)
454 {
455  f.set_next_name(s.name, s.desc);
456  return f;
457 }
458 
460 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, char& v);
462 ITPP_EXPORT it_ifile& operator>>(it_ifile &f, bool &v);
463 
465 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, bin& v);
467 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, short& v);
469 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, int& v);
471 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, float& v);
473 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, double& v);
475 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, std::complex<float>& v);
477 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, std::complex<double>& v);
478 
480 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, bvec& v);
482 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, svec& v);
484 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, ivec& v);
486 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, vec& v);
488 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, cvec& v);
489 
491 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, std::string& str);
492 
494 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, bmat& m);
496 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, smat& m);
498 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, imat& m);
500 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, mat& m);
502 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, cmat& m);
503 
505 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<bin>& v);
507 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<short>& v);
509 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<int>& v);
511 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<float>& v);
513 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<double>& v);
515 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<std::complex<float> >& v);
517 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<std::complex<double> >& v);
518 
520 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<bvec>& v);
522 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<svec>& v);
524 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<ivec>& v);
526 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<vec>& v);
528 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<cvec>& v);
529 
531 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<std::string>& v);
532 
534 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<bmat>& v);
536 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<smat>& v);
538 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<imat>& v);
540 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<mat>& v);
542 ITPP_EXPORT it_ifile& operator>>(it_ifile& f, Array<cmat>& v);
543 
544 
546 ITPP_EXPORT it_file& operator<<(it_file& f, char x);
548 ITPP_EXPORT it_file& operator<<(it_file &f, bool x);
549 
551 ITPP_EXPORT it_file& operator<<(it_file& f, bin x);
553 ITPP_EXPORT it_file& operator<<(it_file& f, short x);
555 ITPP_EXPORT it_file& operator<<(it_file& f, int x);
557 ITPP_EXPORT it_file& operator<<(it_file& f, float x);
559 ITPP_EXPORT it_file& operator<<(it_file& f, double x);
561 ITPP_EXPORT it_file& operator<<(it_file& f, std::complex<float> x);
563 ITPP_EXPORT it_file& operator<<(it_file& f, std::complex<double> x);
564 
566 ITPP_EXPORT it_file& operator<<(it_file& f, const bvec& v);
568 ITPP_EXPORT it_file& operator<<(it_file& f, const svec& v);
570 ITPP_EXPORT it_file& operator<<(it_file& f, const ivec& v);
572 ITPP_EXPORT it_file& operator<<(it_file& f, const vec& v);
574 ITPP_EXPORT it_file& operator<<(it_file& f, const cvec& v);
575 
577 ITPP_EXPORT it_file& operator<<(it_file& f, const std::string& str);
578 
580 ITPP_EXPORT it_file& operator<<(it_file& f, const bmat& m);
582 ITPP_EXPORT it_file& operator<<(it_file& f, const smat& m);
584 ITPP_EXPORT it_file& operator<<(it_file& f, const imat& m);
586 ITPP_EXPORT it_file& operator<<(it_file& f, const mat& m);
588 ITPP_EXPORT it_file& operator<<(it_file& f, const cmat& m);
589 
591 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<bin>& v);
593 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<short>& v);
595 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<int>& v);
597 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<float>& v);
599 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<double>& v);
601 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<std::complex<float> >& v);
603 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<std::complex<double> >& v);
604 
606 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<bvec>& v);
608 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<svec>& v);
610 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<ivec>& v);
612 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<vec>& v);
614 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<cvec>& v);
615 
617 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<std::string>& v);
618 
620 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<bmat>& v);
622 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<smat>& v);
624 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<imat>& v);
626 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<mat>& v);
628 ITPP_EXPORT it_file& operator<<(it_file& f, const Array<cmat>& v);
629 
631 template <class T> inline
632 void it_save_var_as(const T& v, const std::string& name)
633 {
634  it_file f(name + ".it");
635  f << Name(name) << v;
636  f.close();
637 }
638 
640 template <class T> inline
641 void it_load_var_as(T& v, const std::string& name)
642 {
643  it_ifile f(name + ".it");
644  f.seek(name);
645  f >> v;
646  f.close();
647 }
648 
650 #define it_save_var(v) it_save_var_as(v,#v)
651 
652 #define it_load_var(v) it_load_var_as(v,#v)
653 
655 
656 
657 // ----------------------------------------------------------------------
658 // Deprecated implementation of IT++ file format version 2
659 // Will be removed in future versions
660 // ----------------------------------------------------------------------
661 
668 class ITPP_EXPORT it_file_base_old
669 {
670 public:
671 
673  struct data_header {
675  char endianity;
678  uint32_t hdr_bytes, data_bytes, block_bytes;
680 
681  std::string name;
683  std::string type;
684  };
685 
686 protected:
687 
689  struct file_header {
691  char magic[4];
693  char version;
694  };
696  static char file_magic[4];
698  static char file_version;
699 };
700 
707 class ITPP_EXPORT it_ifile_old : public it_file_base_old
708 {
709 public:
711  it_ifile_old();
713  explicit it_ifile_old(const std::string& name);
715  virtual ~it_ifile_old() { }
717  void open(const std::string& name);
719  virtual void close();
721  bfstream& low_level() { return s; }
722 
724  bool read_check_file_header();
726  void read_data_header(data_header& h);
728  void low_level_read(char& x);
730  void low_level_read(bin& x);
732  void low_level_read(short& x);
734  void low_level_read(int& x);
736  void low_level_read(float& x);
738  void low_level_read(double& x);
740  void low_level_read(std::complex<float>& x);
742  void low_level_read(std::complex<double>& x);
744  void low_level_read_lo(vec& v);
746  void low_level_read_hi(vec& v);
748  void low_level_read(ivec& v);
750  void low_level_read(bvec& v);
752  void low_level_read_lo(cvec& v);
754  void low_level_read_hi(cvec& v);
756  void low_level_read(std::string& str);
758  void low_level_read_lo(mat& m);
760  void low_level_read_hi(mat& m);
762  void low_level_read(imat& m);
764  void low_level_read(bmat& m);
766  void low_level_read_lo(cmat& m);
768  void low_level_read_hi(cmat& m);
769 
771  void low_level_read_lo(Array<float>& v);
773  void low_level_read_lo(Array<double>& v);
775  void low_level_read_hi(Array<double>& v);
777  void low_level_read(Array<int>& v);
779  void low_level_read(Array<bin>& v);
781  void low_level_read_lo(Array<std::complex<float> >& v);
783  void low_level_read_lo(Array<std::complex<double> >& v);
785  void low_level_read_hi(Array<std::complex<double> >& v);
786 
788  bool seek(const std::string& name);
789 
791  bool seek(int n);
793  void info(std::string& name, std::string& type, int& bytes);
794 
795 protected:
798 };
799 
806 class ITPP_EXPORT it_file_old : public it_ifile_old
807 {
808 public:
810  typedef it_file_old& (*it_manip)(it_file_old&);
811 
813  it_file_old();
814 
821  explicit it_file_old(const std::string& name, bool trunc = false);
822 
824  virtual ~it_file_old() { delete _string;}
825 
832  void open(const std::string& name, bool trunc = false);
833 
835  void close();
836 
838  void flush();
839 
841  bfstream& low_level() { return s; }
842 
844  void set_low_precision(bool p = true) { low_prec = p; }
845 
847  bool get_low_precision() { return low_prec; }
848 
850  void set_next_name(const std::string& n) { next_name() = n; }
851 
853  void write_file_header();
855  void write_data_header(const std::string& type, uint32_t size);
857  void write_data_header(const std::string& type, const std::string& name,
858  uint32_t size);
860  void low_level_write(char x);
862  void low_level_write(bin x);
864  void low_level_write(short x);
866  void low_level_write(int x);
868  void low_level_write(float x);
870  void low_level_write(double x);
872  void low_level_write(const std::complex<float>& x);
874  void low_level_write(const std::complex<double>& x);
876  void low_level_write(const vec& v);
878  void low_level_write(const ivec& v);
880  void low_level_write(const bvec& v);
882  void low_level_write(const cvec& v);
884  void low_level_write(const std::string& str);
886  void low_level_write(const mat& m);
888  void low_level_write(const imat& m);
890  void low_level_write(const bmat& m);
892  void low_level_write(const cmat& m);
894  void low_level_write(const Array<float>& v);
896  void low_level_write(const Array<double>& v);
898  void low_level_write(const Array<int>& v);
900  void low_level_write(const Array<bin>& v);
902  void low_level_write(const Array<std::complex<float> >& v);
904  void low_level_write(const Array<std::complex<double> >& v);
905 
907  it_file_old& operator<<(it_manip func) { return (*func)(*this); }
908 
910  void remove(const std::string& name);
912  bool exists(const std::string& name);
914  void pack();
915 
916 protected:
918  void remove();
920  void write_data_header_here(const data_header& h);
921 
923  bool low_prec;
925  std::string& next_name() {return _string->_next_name;}
926 private:
927  struct String_Holder
928  {
929  std::string _next_name;
930  String_Holder():_next_name(""){}
931  };
932  String_Holder* _string;
933 };
934 
948 {
949  f.flush();
950  return f;
951 }
952 
953 
955 
956 
959 {
960  f.seek(s.name);
961  return f;
962 }
963 
965 inline it_file_old& operator<<(it_file_old& f, const Name& s)
966 {
967  f.set_next_name(s.name);
968  return f;
969 }
970 
972 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, char& v);
973 
975 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, bin& v);
976 
978 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, short& v);
979 
981 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, int& v);
982 
984 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, float& v);
985 
987 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, double& v);
988 
990 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, std::complex<float>& v);
991 
993 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, std::complex<double>& v);
994 
996 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, vec& v);
997 
999 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, ivec& v);
1000 
1002 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, bvec& v);
1003 
1005 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, cvec& v);
1006 
1008 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, std::string& str);
1009 
1011 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, mat& m);
1012 
1014 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, imat& m);
1015 
1017 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, bmat& m);
1018 
1020 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, cmat& m);
1021 
1023 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<float>& v);
1024 
1026 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<double>& v);
1027 
1029 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<int>& v);
1030 
1032 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<bin>& v);
1033 
1035 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<std::complex<float> >& v);
1036 
1038 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<std::complex<double> >& v);
1039 
1041 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<vec>& v);
1042 
1044 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<ivec>& v);
1045 
1047 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<bvec>& v);
1048 
1050 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<cvec>& v);
1051 
1053 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<std::string>& v);
1054 
1056 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<mat>& v);
1057 
1059 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<imat>& v);
1060 
1062 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<bmat>& v);
1063 
1065 ITPP_EXPORT it_ifile_old& operator>>(it_ifile_old& f, Array<cmat>& v);
1066 
1067 
1069 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, char x);
1070 
1072 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, bin x);
1073 
1075 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, short x);
1076 
1078 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, int x);
1079 
1081 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, float x);
1082 
1084 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, double x);
1085 
1087 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, std::complex<float> x);
1088 
1090 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, std::complex<double> x);
1091 
1093 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const vec& v);
1094 
1096 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const ivec& v);
1097 
1099 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const bvec& v);
1100 
1102 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const cvec& v);
1103 
1105 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const std::string& str);
1106 
1108 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const mat& m);
1109 
1111 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const imat& m);
1112 
1114 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const bmat& m);
1115 
1117 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const cmat& m);
1118 
1120 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<float>& v);
1121 
1123 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<double>& v);
1124 
1126 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<int>& v);
1127 
1129 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<bin>& v);
1130 
1132 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<std::complex<float> >& v);
1133 
1135 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<std::complex<double> >& v);
1136 
1138 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<vec>& v);
1139 
1141 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<ivec>& v);
1142 
1144 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<bvec>& v);
1145 
1147 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<cvec>& v);
1148 
1150 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<std::string>& v);
1151 
1153 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<mat>& v);
1154 
1156 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<imat>& v);
1157 
1159 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<bmat>& v);
1160 
1162 ITPP_EXPORT it_file_old& operator<<(it_file_old& f, const Array<cmat>& v);
1163 
1165 
1166 // ----------------------------------------------------------------------
1167 // End of the deprecated implementation of IT++ file format version 2
1168 // Will be removed in future versions
1169 // ----------------------------------------------------------------------
1170 
1171 } // namespace itpp
1172 
1173 #endif // #ifndef IT_FILE_H
1174 
SourceForge Logo

Generated on Sat Jul 6 2013 10:54:20 for IT++ by Doxygen 1.8.2