vg
tools for working with variation graphs
|
#include <options.hpp>
Public Member Functions | |
virtual void | reset_chain () |
Reset the chain to its initial values. More... | |
virtual bool | tick_chain () |
virtual TickChainLink & | chain (TickChainLink &next) |
virtual std::function< void(const std::function< void(void)> &)> | get_iterator () |
Public Attributes | |
std::function< void(void)> | reset_chain_parent |
This will be called when we want to reset_chain what we are chained onto. More... | |
std::function< bool(void)> | tick_chain_parent |
This will be called when we need to tick_chain our parent. More... | |
Interface for things that form a "chain" that can be "ticked".
Each link in the chain works like a digit place in a number, and ticking increments the number. This lets us do gird search over a bunch of values of different types without a bunch of nexted loops.
|
virtual |
Add a thing to the chain after us. Return that thing.
Reimplemented in vg::subcommand::GroupedOptionGroup, vg::subcommand::OptionGroup< Receiver >, and vg::subcommand::RangeArgSpec< T, Receiver >.
|
virtual |
Get a function that runs another function for each combination of values for this Range and all Ranges it has been chained onto.
|
virtual |
Reset the chain to its initial values.
Reimplemented in vg::Range< Number >, and vg::Range< T >.
|
virtual |
Tick the chain. Return true if there's still a value for the chain, and false if the chain is out of values.
Reimplemented in vg::Range< Number >, and vg::Range< T >.
std::function<void(void)> vg::subcommand::TickChainLink::reset_chain_parent |
This will be called when we want to reset_chain what we are chained onto.
std::function<bool(void)> vg::subcommand::TickChainLink::tick_chain_parent |
This will be called when we need to tick_chain our parent.