Public Member Functions
mbl_read_multi_props_type Class Reference

The type of the property dictionary. More...

#include <mbl_read_multi_props.h>

List of all members.

Public Member Functions

vcl_string get_required_property (const vcl_string &label)
 Return a single expected value of the given property label.
vcl_string get_optional_property (const vcl_string &label, const vcl_string &default_prop="")
 Return a single value of the given property label.
void get_required_properties (const vcl_string &label, vcl_vector< vcl_string > &values, const unsigned nmax=(unsigned)(-1), const unsigned nmin=1)
 Return a vector of all values for a given property label label.
void get_optional_properties (const vcl_string &label, vcl_vector< vcl_string > &values, const unsigned nmax=(unsigned)(-1))
 Return a vector of all values for a given property label label.

Detailed Description

The type of the property dictionary.

Definition at line 16 of file mbl_read_multi_props.h.


Member Function Documentation

void mbl_read_multi_props_type::get_optional_properties ( const vcl_string &  label,
vcl_vector< vcl_string > &  values,
const unsigned  nmax = (unsigned)(-1) 
)

Return a vector of all values for a given property label label.

All entries of label are removed from the property list. Returns an empty vector if label doesn't occur at least once.

Parameters:
nmaxThe maximum number of permitted occurrences of this label (default=max<unsigned>).
Exceptions:
mbl_exception_read_props_parse_errorif label occurs too many times.

Definition at line 332 of file mbl_read_multi_props.cxx.

vcl_string mbl_read_multi_props_type::get_optional_property ( const vcl_string &  label,
const vcl_string &  default_prop = "" 
)

Return a single value of the given property label.

The matching entry is removed from the property list. returns empty string or default_prop if label doesn't exist.

Exceptions:
mbl_exception_read_props_parse_errorif there are two or more values of label.

Definition at line 279 of file mbl_read_multi_props.cxx.

void mbl_read_multi_props_type::get_required_properties ( const vcl_string &  label,
vcl_vector< vcl_string > &  values,
const unsigned  nmax = (unsigned)(-1),
const unsigned  nmin = 1 
)

Return a vector of all values for a given property label label.

All entries of label are removed from the property list.

Exceptions:
mbl_exception_missing_propertyif label doesn't occur at least once.
Parameters:
nmaxThe maximum number of permitted occurrences of this label (default=max<unsigned>).
nminThe minimum number of permitted occurrences of this label (default=1).
Exceptions:
mbl_exception_read_props_parse_errorif label occurs an invalid number of times.

Definition at line 297 of file mbl_read_multi_props.cxx.

vcl_string mbl_read_multi_props_type::get_required_property ( const vcl_string &  label)

Return a single expected value of the given property label.

The matching entry is removed from the property list.

Exceptions:
mbl_exception_missing_propertyif label doesn't exist.
mbl_exception_read_props_parse_errorif there are two or more values of label.

Definition at line 259 of file mbl_read_multi_props.cxx.


The documentation for this class was generated from the following files: