Functions
contrib/mul/mbl/mbl_parse_sequence.h File Reference

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.

Detailed Description

Load a sequence of PODs/objects from a config file.

Author:
Ian Scott
Date:
7-Aug-2007

Definition in file mbl_parse_sequence.h.


Function Documentation

template<class ITER , class T >
void mbl_parse_sequence ( vcl_istream &  afs,
ITER  insert_iter,
 
) [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

Exceptions:
mbl_exception_parse_errorif 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.