Load an int_list of PODs/objects from a config file. More...
Go to the source code of this file.
Functions | |
template<class ITER , class T > | |
void | mbl_parse_int_list (vcl_istream &afs, ITER insert_iter, T) |
Read a list of integers from a stream. |
Load an int_list of PODs/objects from a config file.
Definition in file mbl_parse_int_list.h.
void mbl_parse_int_list | ( | vcl_istream & | afs, |
ITER | insert_iter, | ||
T | |||
) | [inline] |
Read a list of integers from a stream.
This integer list should be space-separated. Lists of the form "{ 1 2 5 : 10 }" a la matlab are accepted. Note that "a : b" will include b rather than following normal C++ convention. Failed parsing will cause an exception to be thrown, and the stream's fail bit to be set
mbl_exception_parse_error | if unrecoverable parse error. |
Example: vcl_vector<unsigned> v; mbl_parse_int_list(vcl_cin, vcl_back_inserter(v), unsigned());
Definition at line 28 of file mbl_parse_int_list.h.