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::vector< std::pair< 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 55 of file optionparser.hh.

Member Typedef Documentation

◆ const_iterator

typedef CParts::const_iterator CComplexOptionParser::const_iterator

the iterator over the parts of a complex option

Definition at line 66 of file optionparser.hh.

◆ CParts

typedef std::vector<std::pair<std::string, CParsedOptions> > CComplexOptionParser::CParts

Type for a map of parts of a complex option.

Definition at line 63 of file optionparser.hh.

◆ SSeperators

typedef char CComplexOptionParser::SSeperators[]

define thy type for a list of separators

Definition at line 60 of file optionparser.hh.

Constructor & Destructor Documentation

◆ CComplexOptionParser()

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

Member Function Documentation

◆ begin()

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

Referenced by create_plugin< Handler, Chained, chainable >::apply(), create_plugin< Handler, ProductChained, true >::apply(), and BOOST_TEST_create_from_plugin().

◆ end()

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

Referenced by create_plugin< Handler, ProductChained, true >::apply().

◆ set_seperators()

static void CComplexOptionParser::set_seperators ( SSeperators  sep)
static

replace the standart set of seperators

Parameters
septhe new seperators

◆ size()

CParts::size_type CComplexOptionParser::size ( ) const

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