The NumerotationContextCommands class this class provide methods to handle content of NumerotationContext.
More...
#include <numerotationcontextcommands.h>
|
| static void | carry (NumerotationContext &contextnum, int from_index) |
| | NumerotationContextCommands::carry Add one unit to the nearest numeric part at or before from_index in contextnum, skipping non-numeric parts (e.g. a "." string separator) along the way. If that part is itself a wrap part and this pushes it to (or past) its own modulus, it wraps back to 0 and the carry cascades further back – so wrap parts can be chained (e.g. seconds wrapping into minutes wrapping into hours).
|
| static void | borrow (NumerotationContext &contextnum, int from_index) |
| | NumerotationContextCommands::borrow Inverse of carry(): subtract one unit from the nearest numeric part at or before from_index. If that part is itself a wrap part and this takes it below 0, it wraps to (modulus - 1) and the borrow cascades further back.
|
The NumerotationContextCommands class this class provide methods to handle content of NumerotationContext.
◆ NumerotationContextCommands()
◆ ~NumerotationContextCommands()
| NumerotationContextCommands::~NumerotationContextCommands |
( |
| ) |
|
◆ borrow()
NumerotationContextCommands::borrow Inverse of carry(): subtract one unit from the nearest numeric part at or before from_index. If that part is itself a wrap part and this takes it below 0, it wraps to (modulus - 1) and the borrow cascades further back.
◆ carry()
NumerotationContextCommands::carry Add one unit to the nearest numeric part at or before from_index in contextnum, skipping non-numeric parts (e.g. a "." string separator) along the way. If that part is itself a wrap part and this pushes it to (or past) its own modulus, it wraps back to 0 and the carry cascades further back – so wrap parts can be chained (e.g. seconds wrapping into minutes wrapping into hours).
- Parameters
-
| contextnum | the context being built by next(); already contains entries for every index <= from_index |
| from_index | index to start looking from, going backwards |
◆ next()
◆ previous()
◆ setNumStrategy()
| void NumerotationContextCommands::setNumStrategy |
( |
const QString & | str | ) |
|
|
private |
◆ toRepresentedString()
| QString NumerotationContextCommands::toRepresentedString |
( |
| ) |
|
NumerotationContextCommands::toFinalString.
- Returns
- the string represented by the numerotation context
◆ context_
◆ diagram_
| Diagram* NumerotationContextCommands::diagram_ |
|
private |
◆ strategy_
The documentation for this class was generated from the following files: