Parse list of strings. More...
#include <vcl_string.h>#include <vcl_vector.h>#include <vcl_iostream.h>Go to the source code of this file.
Functions | |
| void | mbl_parse_keyword_list (vcl_istream &is, const vcl_string &keyword, vcl_vector< vcl_string > &items, bool discard_comments=false) |
| Read in keyword separated blocks of text from stream. | |
| void | mbl_parse_keyword_list2 (vcl_istream &is, const vcl_string &keyword, vcl_vector< vcl_string > &items, bool discard_comments=false) |
| Read in keyword separated blocks of text from stream. | |
Parse list of strings.
Definition in file mbl_parse_keyword_list.h.
| void mbl_parse_keyword_list | ( | vcl_istream & | is, |
| const vcl_string & | keyword, | ||
| vcl_vector< vcl_string > & | items, | ||
| bool | discard_comments | ||
| ) |
Read in keyword separated blocks of text from stream.
Assumes list of blocks separated by a keyword. keyword is always the same word, defined in the input variable. Expects format of data:
{
object: { data: fruit0 }
object: { data: fruit1 }
object: { data: fruit2 }
}
To parse this, require keyword="object:".
For this example, on exit, items[1]=="{ data: fruit1 }", which could
be passed to mbl_read_props.
Throws a mbl_exception_parse_error if it fails.
Read in keyword separated blocks of text from stream.
Assumes list of objects separated by a keyword. keyword is always the same word, defined in the input variable. Expects format of data:
{
keyword: string1
keyword: { stuff in braces }
keyword: string3
}
Definition at line 23 of file mbl_parse_keyword_list.cxx.
| void mbl_parse_keyword_list2 | ( | vcl_istream & | is, |
| const vcl_string & | keyword, | ||
| vcl_vector< vcl_string > & | items, | ||
| bool | discard_comments | ||
| ) |
Read in keyword separated blocks of text from stream.
Assumes list of blocks separated by a keyword. keyword is always the same word, defined in the input variable. Expects format of data:
{
object: thing0 { data: fruit0 }
object: thing1 { data: fruit1 }
object: thing2 { data: fruit2 }
}
To parse this, require keyword="object:".
For this example, on exit, items[1]=="thing1 { data: fruit1 }".
Throws a mbl_exception_parse_error if it fails.
Read in keyword separated blocks of text from stream.
Assumes list of objects separated by a keyword. keyword is always the same word, defined in the input variable. Expects format of data:
{
keyword: string1 { stuff in braces }
}
Definition at line 76 of file mbl_parse_keyword_list.cxx.
1.7.5.1