Public Types
CComplexOptionParser Class Reference

Parser for complex command line options. More...

#include <mia/core/optionparser.hh>

Public Types

typedef CParts::const_iterator const_iterator
 the iterator over the parts of a complex option More...
 
typedef std::multimap
< std::string, CParsedOptions
CParts
 Type for a map of parts of a complex option. More...
 
typedef char SSeperators []
 

constructor

Parse the input string and split it in a nested list of name-value pairs

Parameters
paramthe option string
 CComplexOptionParser (const std::string &param)
 
const_iterator begin () const
 
const_iterator end () const
 
CParts::size_type size () const
 
static void set_seperators (SSeperators sep)
 

Detailed Description

Parser for complex command line options.

This is a little parser to parse more complex command line options. The syntax of the command line is "ssd:src=img1.v,ref=img2.v+lm:src=lm1.lmx,ref=lm2.lmx,f=[tsp:r=3]" with one level of brackets allowed

Above options string will be split off like: < ssd, { < src, img1.v >, < ref, img2.v > } > < lm, ( < src, lm1.lmx >, < ref, lm2.lmx >, < f, tsp:r=3 > } >

Definition at line 54 of file optionparser.hh.

Member Typedef Documentation

typedef CParts::const_iterator CComplexOptionParser::const_iterator

the iterator over the parts of a complex option

Definition at line 65 of file optionparser.hh.

typedef std::multimap<std::string, CParsedOptions> CComplexOptionParser::CParts

Type for a map of parts of a complex option.

Definition at line 62 of file optionparser.hh.

typedef char CComplexOptionParser::SSeperators[]

define thy type for a list of separators

Definition at line 59 of file optionparser.hh.

Constructor & Destructor Documentation

CComplexOptionParser::CComplexOptionParser ( const std::string &  param)

Member Function Documentation

const_iterator CComplexOptionParser::begin ( ) const
Returns
the begin iterator to the list of option parts that are (normally) delimited by '+'

Referenced by BOOST_TEST_create_from_plugin().

const_iterator CComplexOptionParser::end ( ) const
Returns
the end iterator to the list of option parts that are (normally) delimited by '+'
static void CComplexOptionParser::set_seperators ( SSeperators  sep)
static

replace the standart set of seperators

Parameters
septhe new seperators
CParts::size_type CComplexOptionParser::size ( ) const
Returns
the number of the parts in the option string parsed

Referenced by BOOST_TEST_create_from_plugin().


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