Parse list of string pairs separated by colons. More...
#include "mbl_parse_colon_pairs_list.h"
#include <mbl/mbl_exception.h>
#include <vsl/vsl_indent.h>
#include <vcl_sstream.h>
#include <vcl_cassert.h>
Go to the source code of this file.
Functions | |
void | mbl_parse_colon_pairs_list (const vcl_string &data, vcl_vector< vcl_string > &item1, vcl_vector< vcl_string > &item2) |
Parse list of string pairs separated by colons. | |
void | mbl_parse_colon_pairs_list (vcl_istream &is, vcl_vector< vcl_string > &item1, vcl_vector< vcl_string > &item2) |
Parse list of string pairs separated by colons. | |
void | mbl_write_colon_pairs_list (vcl_ostream &os, const vcl_vector< vcl_string > &item1, const vcl_vector< vcl_string > &item2) |
Writes pairs to a stream, separated by colons. |
Parse list of string pairs separated by colons.
Definition in file mbl_parse_colon_pairs_list.cxx.
void mbl_parse_colon_pairs_list | ( | const vcl_string & | data, |
vcl_vector< vcl_string > & | item1, | ||
vcl_vector< vcl_string > & | item2 | ||
) |
Parse list of string pairs separated by colons.
Expects format of data string to contain pairs of strings, with colons between items, eg
{ item1_0 : item2_0 item1_1 : item2_1 item1_2 : item2_2 }
Throws a mbl_exception_parse_error if it fails.
Definition at line 23 of file mbl_parse_colon_pairs_list.cxx.
void mbl_parse_colon_pairs_list | ( | vcl_istream & | is, |
vcl_vector< vcl_string > & | item1, | ||
vcl_vector< vcl_string > & | item2 | ||
) |
Parse list of string pairs separated by colons.
Expects format of data string to contain pairs of strings, with colons between items, eg
{ item1_0 : item2_0 item1_1 : item2_1 item1_2 : item2_2 }
Throws a mbl_exception_parse_error if it fails.
Definition at line 42 of file mbl_parse_colon_pairs_list.cxx.
void mbl_write_colon_pairs_list | ( | vcl_ostream & | os, |
const vcl_vector< vcl_string > & | item1, | ||
const vcl_vector< vcl_string > & | item2 | ||
) |
Writes pairs to a stream, separated by colons.
Format of output
{ item1[0] : item2[0] item1[1] : item2[1] }
Definition at line 112 of file mbl_parse_colon_pairs_list.cxx.