Load a sequence of PODs/objects from a config file. More...
#include <vcl_algorithm.h>
#include <vcl_istream.h>
#include <vcl_iterator.h>
#include <mbl/mbl_exception.h>
Go to the source code of this file.
Functions | |
template<class ITER , class T > | |
void | mbl_parse_sequence (vcl_istream &afs, ITER insert_iter, T) |
Read a sequence of PODs from a stream. |
Load a sequence of PODs/objects from a config file.
Definition in file mbl_parse_sequence.h.
void mbl_parse_sequence | ( | vcl_istream & | afs, |
ITER | insert_iter, | ||
T | |||
) | [inline] |
Read a sequence of PODs from a stream.
This function will read through a stream, and store the text found to a string. The function terminates correctly when it finds a matched closing brace, Alternatively, if there was no opening brace, it will terminate at the end of a stream. Other conditions 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_sequence(vcl_cin, vcl_back_inserter(v), unsigned());
Definition at line 29 of file mbl_parse_sequence.h.