vg
tools for working with variation graphs
Public Member Functions | Public Attributes | List of all members
vg::subcommand::Preset Struct Reference

#include <options.hpp>

Public Member Functions

 Preset ()=default
 
 Preset (const Preset &other)
 
 Preset (Preset &&other)=default
 
Presetoperator= (const Preset &other)
 
Presetoperator= (Preset &&other)=default
 
template<typename T >
Presetadd_entry (const std::string &option, const T &value)
 As part of this preset, set the given option to the given value. More...
 
void apply (BaseOptionGroup &parser) const
 Apply stored presets to the given parser. More...
 

Public Attributes

std::vector< std::unique_ptr< BaseValuation > > entries
 

Detailed Description

Represents a named preset of command-line option default overrides. Options are organized by long option name.

Make one of these, and use add_entry() to add values to it, and then use apply(root_option_group) to apply it.

Constructor & Destructor Documentation

◆ Preset() [1/3]

vg::subcommand::Preset::Preset ( )
default

◆ Preset() [2/3]

vg::subcommand::Preset::Preset ( const Preset other)
inline

◆ Preset() [3/3]

vg::subcommand::Preset::Preset ( Preset &&  other)
default

Member Function Documentation

◆ add_entry()

template<typename T >
Preset & vg::subcommand::Preset::add_entry ( const std::string &  option,
const T &  value 
)

As part of this preset, set the given option to the given value.

◆ apply()

void vg::subcommand::Preset::apply ( BaseOptionGroup parser) const
inline

Apply stored presets to the given parser.

◆ operator=() [1/2]

Preset & vg::subcommand::Preset::operator= ( const Preset other)
inline

◆ operator=() [2/2]

Preset& vg::subcommand::Preset::operator= ( Preset &&  other)
default

Member Data Documentation

◆ entries

std::vector<std::unique_ptr<BaseValuation> > vg::subcommand::Preset::entries

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