Load properties with repeated labels from text files. More...
#include <vcl_map.h>
#include <vcl_iosfwd.h>
#include <vcl_string.h>
#include <vcl_vector.h>
Go to the source code of this file.
Classes | |
class | mbl_read_multi_props_type |
The type of the property dictionary. More... | |
Functions | |
mbl_read_multi_props_type | mbl_read_multi_props_ws (vcl_istream &afs) |
Read properties with repeated labels from a text stream. | |
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 . | |
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. | |
void | mbl_read_multi_props_look_for_unused_props (const vcl_string &function_name, const mbl_read_multi_props_type &props) |
Throw error if there are any keys in props. |
Load properties with repeated labels from text files.
Definition in file mbl_read_multi_props.h.
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.
void mbl_read_multi_props_look_for_unused_props | ( | const vcl_string & | function_name, |
const mbl_read_multi_props_type & | props | ||
) | [inline] |
Throw error if there are any keys in props.
mbl_exception_unused_props |
Definition at line 88 of file mbl_read_multi_props.h.
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 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. 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.
Differs from mbl_read_props_ws(afs) in that a property label can be repeated, and the all the repeated values will be returned.
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.