All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Option Actions

Actions provided by default. More...

Classes

struct  gears::optparse::store< T >
 The default action used for values. More...
 
struct  gears::optparse::store_const< T >
 An action used to store constant values. More...
 
struct  gears::optparse::store_list< Container, Action >
 An action used to parse a list of values. More...
 

Detailed Description

Actions are callback mechanisms used to "parse" the key value pairs given by the command line options. For example:

Syntax Key Value
--key=v "&ndash;key" "v"
--key v "&ndash;key" "v"
-k=v "-k" "v"
-k v "-k" "v"
-ok=v "-k" "v"
-ok=v "-o" ""

The signature of an action must be equivalent to T(const std::string& key, const std::string& value), where:

The action can be a lambda, a function, a functor and any callable object that meets the requirements above.