#include "mbl_read_props.h"#include <vsl/vsl_indent.h>#include <vcl_sstream.h>#include <vcl_iostream.h>#include <vcl_string.h>#include <vcl_cctype.h>#include <mbl/mbl_parse_block.h>#include <mbl/mbl_exception.h>Go to the source code of this file.
Functions | |
| void | mbl_read_props_print (vcl_ostream &afs, mbl_read_props_type props) |
| Print a list of properties for debugging purposes. | |
| mbl_read_props_type | mbl_read_props (vcl_istream &afs) |
| Read properties from a text stream. | |
| mbl_read_props_type | mbl_read_props_ws (vcl_istream &afs) |
| Read properties from a text stream. | |
| mbl_read_props_type | mbl_read_props_merge (const mbl_read_props_type &a, const mbl_read_props_type &b, bool first_overrides) |
| merge two property sets. | |
| void | mbl_read_props_look_for_unused_props (const vcl_string &function_name, const mbl_read_props_type &props, const mbl_read_props_type &ignore) |
| Throw error if there are any keys in props that aren't in ignore. | |
Definition in file mbl_read_props.cxx.
| mbl_read_props_type mbl_read_props | ( | vcl_istream & | afs | ) |
Read properties from a text stream.
The function will terminate on an eof. If one of the opening lines contains an opening brace '{', then the function will also stop reading the stream after finding a line containing a closing brace '}'
There should be one property per line, with a colon ':' after each property label. The remainder of that line is the property value. If the next line begins with a brace, the following text up to matching braces is included in the property value. Each property label should not contain any whitespace.
Definition at line 78 of file mbl_read_props.cxx.
| void mbl_read_props_look_for_unused_props | ( | const vcl_string & | function_name, |
| const mbl_read_props_type & | props, | ||
| const mbl_read_props_type & | ignore | ||
| ) |
Throw error if there are any keys in props that aren't in ignore.
| mbl_exception_unused_props |
Definition at line 418 of file mbl_read_props.cxx.
| mbl_read_props_type mbl_read_props_merge | ( | const mbl_read_props_type & | a, |
| const mbl_read_props_type & | b, | ||
| bool | first_overrides | ||
| ) |
merge two property sets.
| first_overrides | properties in "a" will override identically named properties in "b" |
Definition at line 384 of file mbl_read_props.cxx.
| void mbl_read_props_print | ( | vcl_ostream & | afs, |
| mbl_read_props_type | props | ||
| ) |
Print a list of properties for debugging purposes.
Definition at line 47 of file mbl_read_props.cxx.
| mbl_read_props_type mbl_read_props_ws | ( | vcl_istream & | afs | ) |
Read properties from a text stream.
The function will terminate on an eof. If one of the opening lines contains an opening brace '{', then the function will also stop reading the stream after finding a line containing a closing brace '}'
Every property label ends in ":", and should not contain any whitespace. Differs from mbl_read_props(afs) in that all whitespace is treated as a separator. If there is a brace after the first string following the label, the following text up to matching braces is included in the property value. Each property label should not contain any whitespace.
Definition at line 234 of file mbl_read_props.cxx.
1.7.5.1