|
vg
tools for working with variation graphs
|
#include <options.hpp>
Public Types | |
| using | type = Number |
Public Member Functions | |
| Range () | |
| Default constructor. | |
| Range (const Number &val) | |
| Construct from a single value. | |
| Range (const Range &other) | |
| Copy, preserving destination links. | |
| Range (Range &&other) | |
| Move, preserving destination links. | |
| Range & | operator= (const Range &other) |
| Copy assignment, preserving destination links. | |
| Range & | operator= (Range &&other) |
| Move assignment, preserving destination links. | |
| bool | is_valid () |
| Check the range for usefulness. | |
| operator Number () const | |
| Convert to Number with the current value. | |
| void | reset () |
| Start at our start value. | |
| void | reset_chain () |
| Start us and all the things we are chained onto at their start values. | |
| bool | tick () |
| bool | tick_chain () |
Public Member Functions inherited from vg::subcommand::TickChainLink | |
| virtual TickChainLink & | chain (TickChainLink &next) |
| virtual std::function< void(const std::function< void(void)> &)> | get_iterator () |
Public Attributes | |
| Number | start = 0 |
| Represents the start of the range. | |
| Number | end = 0 |
| Represents the inclusive end of the range. | |
| Number | step = 1 |
| Represents the step to move by each tick. | |
| Number | here = 0 |
| Represents the current value the range is at. | |
| bool | running = false |
| Determines if we are running or not (i.e. is here valid) | |
Public Attributes inherited from vg::subcommand::TickChainLink | |
| std::function< void(void)> | reset_chain_parent |
| This will be called when we want to reset_chain what we are chained onto. | |
| std::function< bool(void)> | tick_chain_parent |
| This will be called when we need to tick_chain our parent. | |
Tickable link that represents a single value or a range of values. Range rusn from start to <=end, going up by step. You can set the range to s aingle value or to a full range, and when you read it you see the current value.
| using vg::Range< Number >::type = Number |
|
inline |
Default constructor.
|
inline |
Construct from a single value.
Copy, preserving destination links.
Move, preserving destination links.
|
inline |
Check the range for usefulness.
|
inline |
Convert to Number with the current value.
|
inline |
Copy assignment, preserving destination links.
|
inline |
Move assignment, preserving destination links.
|
inline |
Start at our start value.
|
inlinevirtual |
Start us and all the things we are chained onto at their start values.
Reimplemented from vg::subcommand::TickChainLink.
|
inline |
Increment our value. Returns true if the new value needs processing, and false if we have left or would leave the range.
|
inlinevirtual |
Increment our value. If it overflows, tick_chain whatever we are chained onto, and reset and succeed if that succeeds.
Reimplemented from vg::subcommand::TickChainLink.
| Number vg::Range< Number >::end = 0 |
Represents the inclusive end of the range.
| Number vg::Range< Number >::here = 0 |
Represents the current value the range is at.
| bool vg::Range< Number >::running = false |
Determines if we are running or not (i.e. is here valid)
| Number vg::Range< Number >::start = 0 |
Represents the start of the range.
| Number vg::Range< Number >::step = 1 |
Represents the step to move by each tick.
1.9.8