|
DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
|
Represents a unique identifier for a financial transaction. More...
#include <TransactionNumber.hpp>
Public Types | |
| using | IntegerType = quint16 |
| The type used to store a transaction’s number. | |
Public Member Functions | |
| TransactionNumber () | |
| Default initialises the object to an invalid numerical value. | |
| TransactionNumber (const IntegerType &value) | |
| Fully initialises the object with the supplied values. | |
| const IntegerType & | integer () const noexcept |
| Retrieves the integer value representing the transaction number. | |
| bool | operator!= (const TransactionNumber &) const noexcept=default |
| TransactionNumber & | operator++ () |
| Increment the object by one. | |
| TransactionNumber | operator++ (int) |
| Increment the object by one. | |
| std::strong_ordering | operator<=> (const TransactionNumber &) const noexcept=default |
| bool | operator== (const TransactionNumber &) const noexcept=default |
Static Public Attributes | |
| static const IntegerType | invalid_ |
| The number that indicates that it is invalid and empty. | |
Represents a unique identifier for a financial transaction.
This is designed to encapsulate the concept of a transaction number, ensuring that it is managed consistently, is always valid, and adapted to specific transactional contexts where unique identification is critical.
| using drn::accounting::TransactionNumber::IntegerType = quint16 |
The type used to store a transaction’s number.
| drn::accounting::TransactionNumber::TransactionNumber | ( | ) |
Default initialises the object to an invalid numerical value.
|
explicit |
Fully initialises the object with the supplied values.
| TransactionError | When the supplied new value is zero. |
| value | The number for the transaction. |
|
nodiscardnoexcept |
Retrieves the integer value representing the transaction number.
|
nodiscarddefaultnoexcept |
| TransactionNumber & drn::accounting::TransactionNumber::operator++ | ( | ) |
Increment the object by one.
| Error | When the result of the incrementation would exceed the limit of the integer storage type. |
|
nodiscard |
Increment the object by one.
| Error | When the result of the incrementation would exceed the limit of the integer storage type. |
|
nodiscarddefaultnoexcept |
|
nodiscarddefaultnoexcept |
|
static |
The number that indicates that it is invalid and empty.