Vcsn  2.3
Be Rational
vcsn::getarg< Value > Struct Template Reference

A mapping from strings to Values. More...

#include <getargs.hh>

Collaboration diagram for vcsn::getarg< Value >:

Public Types

using value_t = Value
 
using data_t = boost::variant< std::string, Value >
 
using map_t = std::map< std::string, data_t >
 

Public Member Functions

 getarg (const std::string &kind, std::initializer_list< typename map_t::value_type > args)
 
const value_toperator[] (std::string s) const
 The value associated to s. More...
 

Public Attributes

std::string kind_
 The nature of the selection. Used in error messages. More...
 
map_t map_
 string -> (string | value). More...
 

Detailed Description

template<typename Value>
struct vcsn::getarg< Value >

A mapping from strings to Values.

Definition at line 33 of file getargs.hh.

Member Typedef Documentation

template<typename Value >
using vcsn::getarg< Value >::data_t = boost::variant<std::string, Value>

Definition at line 37 of file getargs.hh.

template<typename Value >
using vcsn::getarg< Value >::map_t = std::map<std::string, data_t>

Definition at line 38 of file getargs.hh.

template<typename Value >
using vcsn::getarg< Value >::value_t = Value

Definition at line 36 of file getargs.hh.

Constructor & Destructor Documentation

template<typename Value >
vcsn::getarg< Value >::getarg ( const std::string &  kind,
std::initializer_list< typename map_t::value_type >  args 
)
inline

Definition at line 40 of file getargs.hh.

Member Function Documentation

template<typename Value >
const value_t& vcsn::getarg< Value >::operator[] ( std::string  s) const
inline

The value associated to s.

Definition at line 47 of file getargs.hh.

References vcsn::detail::invalid_argument(), vcsn::getarg< Value >::kind_, vcsn::getarg< Value >::map_, and vcsn::res.

Here is the call graph for this function:

Member Data Documentation

template<typename Value >
std::string vcsn::getarg< Value >::kind_

The nature of the selection. Used in error messages.

Definition at line 62 of file getargs.hh.

Referenced by vcsn::getarg< Value >::operator[]().

template<typename Value >
map_t vcsn::getarg< Value >::map_

string -> (string | value).

Definition at line 64 of file getargs.hh.

Referenced by vcsn::getarg< Value >::operator[]().


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