contrib/mul/mbl/mbl_load_text_file.h
Go to the documentation of this file.
00001 #ifndef mbl_load_text_file_h_
00002 #define mbl_load_text_file_h_
00003 //:
00004 // \file
00005 // \brief Functions to load objects from text file
00006 // \author dac
00007 
00008 #include <vcl_iostream.h>
00009 #include <vcl_string.h>
00010 #include <vcl_vector.h>
00011 
00012 //: Load vector from file with format "v1 v2 .. vn"
00013 // \throws on error, or returns false if exceptions are disabled.
00014 template <class T>
00015 bool mbl_load_text_file(vcl_vector<T>& v, const vcl_string& path);
00016 
00017 //: Load vector from file with format "v1 v2 .. vn"
00018 // \throws on error, or returns false if exceptions are disabled.
00019 template <class T>
00020 bool mbl_load_text_file(vcl_vector<T>& v, vcl_istream& is);
00021 
00022 #endif // mbl_load_text_file_h_