QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
AlphaNum Class Reference

The AlphaNum class Alphabetic auto-numbering (a, b, ... z, aa, ab, ...). Unlike StringNum (a fixed, non-incrementing text segment), this is a real base-26 counter: next()/previous() carry/borrow entirely within this part's own value, the same self-contained shape every other incrementing NumStrategy already has. More...

#include <numerotationcontextcommands.h>

Inheritance diagram for AlphaNum:
Inheritance graph
Collaboration diagram for AlphaNum:
Collaboration graph

Public Member Functions

 AlphaNum (Diagram *)
QString toRepresentedString (const QString) const override
 AlphaNum::toRepresentedString.
NumerotationContext next (const NumerotationContext &, const int) const override
 AlphaNum::next.
NumerotationContext previous (const NumerotationContext &, const int) const override
 AlphaNum::previous.
Public Member Functions inherited from NumStrategy
 NumStrategy (Diagram *=nullptr)
virtual ~NumStrategy ()

Additional Inherited Members

Protected Member Functions inherited from NumStrategy
NumerotationContext nextString (const NumerotationContext &, const int) const
 NumStrategy::nextString.
NumerotationContext nextNumber (const NumerotationContext &, const int) const
 NumStrategy::nextNumber.
NumerotationContext previousNumber (const NumerotationContext &, const int) const
 NumStrategy::previousNumber.
Protected Attributes inherited from NumStrategy
Diagramdiagram_

Detailed Description

The AlphaNum class Alphabetic auto-numbering (a, b, ... z, aa, ab, ...). Unlike StringNum (a fixed, non-incrementing text segment), this is a real base-26 counter: next()/previous() carry/borrow entirely within this part's own value, the same self-contained shape every other incrementing NumStrategy already has.

Constructor & Destructor Documentation

◆ AlphaNum()

AlphaNum::AlphaNum ( Diagram * d)

Constructor

Here is the call graph for this function:

Member Function Documentation

◆ next()

NumerotationContext AlphaNum::next ( const NumerotationContext & nc,
const int i ) const
overridevirtual

AlphaNum::next.

Returns
the next NumerotationContext nc at position i

Implements NumStrategy.

Here is the call graph for this function:

◆ previous()

NumerotationContext AlphaNum::previous ( const NumerotationContext & nc,
const int i ) const
overridevirtual

AlphaNum::previous.

Returns
the previous NumerotationContext nc at posiiton i

Implements NumStrategy.

Here is the call graph for this function:

◆ toRepresentedString()

QString AlphaNum::toRepresentedString ( const QString str) const
overridevirtual

AlphaNum::toRepresentedString.

Returns
the represented string of str

Implements NumStrategy.


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