vg
tools for working with variation graphs
Public Member Functions | Static Public Member Functions | List of all members
vg::OptionValueParser< Value > Class Template Reference

#include <option.hpp>

Public Member Functions

bool has_argument ()
 
void parse_default (const bool &default_value, bool &value)
 
void parse (const string &arg, bool &value)
 
string unparse (const bool &value)
 

Static Public Member Functions

static bool has_argument ()
 
static void parse_default (const Value &default_value, Value &value)
 
static void parse (const string &arg, Value &value)
 
static string unparse (const Value &value)
 

Detailed Description

template<typename Value>
class vg::OptionValueParser< Value >

This class holds static methods explaining how to parse a type.

Member Function Documentation

◆ has_argument() [1/2]

template<typename Value >
static bool vg::OptionValueParser< Value >::has_argument ( )
inlinestatic

Return true if we need an argument and false otherwise.

◆ has_argument() [2/2]

bool vg::OptionValueParser< bool >::has_argument ( )
inline

Bool options don't need arguments.

◆ parse() [1/2]

void vg::OptionValueParser< bool >::parse ( const string &  arg,
bool &  value 
)
inline

If someone gives a value to a bool, explode.

◆ parse() [2/2]

template<typename Value >
static void vg::OptionValueParser< Value >::parse ( const string &  arg,
Value &  value 
)
inlinestatic

Parse from an argument.

◆ parse_default() [1/2]

void vg::OptionValueParser< bool >::parse_default ( const bool &  default_value,
bool &  value 
)
inline

When someone gives a bool option they mean to invert its default value.

◆ parse_default() [2/2]

template<typename Value >
static void vg::OptionValueParser< Value >::parse_default ( const Value &  default_value,
Value &  value 
)
inlinestatic

Parse from no argument, but a default value.

◆ unparse() [1/2]

string vg::OptionValueParser< bool >::unparse ( const bool &  value)
inline

Represent default values for bools as true and false.

◆ unparse() [2/2]

template<typename Value >
static string vg::OptionValueParser< Value >::unparse ( const Value &  value)
inlinestatic

Stringify a default value.


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