#include "mbl_read_multi_props.h"
#include <vsl/vsl_indent.h>
#include <vcl_sstream.h>
#include <vcl_iostream.h>
#include <vcl_string.h>
#include <vcl_cctype.h>
#include <vcl_utility.h>
#include <vcl_iterator.h>
#include <mbl/mbl_parse_block.h>
#include <mbl/mbl_exception.h>
Go to the source code of this file.
Functions | |
void | mbl_read_multi_props_print (vcl_ostream &afs, mbl_read_multi_props_type props) |
Print a list of properties for debugging purposes. | |
void | mbl_read_multi_props_print (vcl_ostream &afs, mbl_read_multi_props_type props, unsigned max_chars) |
Print a list of properties for debugging purposes. Limit each property value length to max_chars . | |
mbl_read_multi_props_type | mbl_read_multi_props_ws (vcl_istream &afs) |
Read properties from a text stream. | |
mbl_read_multi_props_type | mbl_read_multi_props_merge (const mbl_read_multi_props_type &a, const mbl_read_multi_props_type &b, bool first_overrides) |
merge two property sets. | |
void | mbl_read_multi_props_look_for_unused_props (const vcl_string &function_name, const mbl_read_multi_props_type &props, const mbl_read_multi_props_type &ignore) |
Throw error if there are any keys in props that aren't in ignore. |
Definition in file mbl_read_multi_props.cxx.
void mbl_read_multi_props_look_for_unused_props | ( | const vcl_string & | function_name, |
const mbl_read_multi_props_type & | props, | ||
const mbl_read_multi_props_type & | ignore | ||
) |
Throw error if there are any keys in props that aren't in ignore.
mbl_exception_unused_props |
Definition at line 247 of file mbl_read_multi_props.cxx.
mbl_read_multi_props_type mbl_read_multi_props_merge | ( | const mbl_read_multi_props_type & | a, |
const mbl_read_multi_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 213 of file mbl_read_multi_props.cxx.
void mbl_read_multi_props_print | ( | vcl_ostream & | afs, |
mbl_read_multi_props_type | props | ||
) |
Print a list of properties for debugging purposes.
Definition at line 17 of file mbl_read_multi_props.cxx.
void mbl_read_multi_props_print | ( | vcl_ostream & | afs, |
mbl_read_multi_props_type | props, | ||
unsigned | max_chars | ||
) |
Print a list of properties for debugging purposes. Limit each property value length to max_chars
.
Useful for preventing diagnostic output from being flooded by large properties.
Definition at line 28 of file mbl_read_multi_props.cxx.
mbl_read_multi_props_type mbl_read_multi_props_ws | ( | vcl_istream & | afs | ) |
Read properties from a text stream.
Read properties with repeated labels 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_multi_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 65 of file mbl_read_multi_props.cxx.