Load a block of text from a file. More...
#include <vcl_istream.h>
#include <vcl_string.h>
Go to the source code of this file.
Functions | |
vcl_string | mbl_parse_block (vcl_istream &afs, bool open_already=false, const char *comment="//") |
Read a block of text from a stream. |
vcl_string mbl_parse_block | ( | vcl_istream & | afs, |
bool | open_already, | ||
const char * | comment | ||
) |
Read a block of text from a stream.
This function will read through a stream, and store the text found to a string. The function terminates when it finds the closing brace.
The stream's fail bit will be set on error. Comment lines beginning with // will be ignored.
open_already | should be true if the client has already read the opening brace. |
This function will read through a stream, and store the text found to a string. The function terminates when it finds the closing brace.
The stream's fail bit will be set on error. Comment lines beginning with // will be stripped.
open_already | should be true if the client has already read the opening brace. If set to false and the first non-whitespace character is not an opening brace then that character will be left in the stream and "{} will be returned. |
comment | Lines beginning with white space followed by this string will be ignored. |
mbl_exception_parse_block_parse_error | if unrecoverable parse error. Set to empty for no comment stripping. |
The last character to be read from the stream.
Definition at line 28 of file mbl_parse_block.cxx.