Represents a ledger book’s account through-out the entire accounting system, and is its unique identifier. It encapsulates the functionality for storing and managing this identifier.
More...
#include <AccountNumber.h>
|
using | IntegerType = quint32 |
| The type used to store an account’s number. The size is large enough to accommodate different accounting number styles, e.g. sequential, type-sequential, etc.
|
|
Represents a ledger book’s account through-out the entire accounting system, and is its unique identifier. It encapsulates the functionality for storing and managing this identifier.
◆ IntegerType
The type used to store an account’s number. The size is large enough to accommodate different accounting number styles, e.g. sequential, type-sequential, etc.
◆ AccountNumber() [1/2]
drn::accounting::AccountNumber::AccountNumber |
( |
| ) |
|
Default initialises the account number to an invalid state.
◆ AccountNumber() [2/2]
drn::accounting::AccountNumber::AccountNumber |
( |
const IntegerType | value | ) |
|
|
explicit |
Fully initialises the account number.
- Exceptions
-
Error | When the value is not set. |
- Parameters
-
value | The value for the account. |
◆ integer()
const IntegerType & drn::accounting::AccountNumber::integer |
( |
| ) |
const |
|
nodiscardnoexcept |
The underlying value of the account number.
◆ operator!=()
bool drn::accounting::AccountNumber::operator!= |
( |
const AccountNumber & | | ) |
const |
|
nodiscarddefaultnoexcept |
◆ operator<=>()
std::strong_ordering drn::accounting::AccountNumber::operator<=> |
( |
const AccountNumber & | | ) |
const |
|
nodiscarddefaultnoexcept |
◆ operator==() [1/2]
bool drn::accounting::AccountNumber::operator== |
( |
const AccountNumber & | | ) |
const |
|
nodiscarddefaultnoexcept |
◆ operator==() [2/2]
bool drn::accounting::AccountNumber::operator== |
( |
const IntegerType & | other | ) |
const |
|
nodiscardnoexcept |
Determines if the account number is equal to another integer value.
- Parameters
-
other | The integer value to compare against the current account number. |
- Returns
- A boolean value. Returns true if the integer value is equal to the current account number; otherwise, returns false.
◆ fieldWidth_
const quint8 drn::accounting::AccountNumber::fieldWidth_ |
|
static |
The number of characters that the account code number should always be displayed as, currently four.
◆ invalid_
const IntegerType drn::accounting::AccountNumber::invalid_ |
|
static |
The number that is an invalid for an account code.