FOSSredder
0.5.0
Loading...
Searching...
No Matches
MoneyAmount.h
Go to the documentation of this file.
1
5
6
#pragma once
7
8
#include <cmath>
9
10
namespace
core::domain
{
11
12
class
MoneyAmount
{
13
public
:
14
double
value
()
const
noexcept
;
15
16
MoneyAmount
() =
default
;
21
explicit
MoneyAmount
(
double
value
);
22
28
static
bool
isValid
(
double
value
)
noexcept
{
29
return
std::isfinite(
value
);
30
}
31
private
:
32
double
value_ = 0.0;
33
};
34
35
}
// namespace core::domain
core::domain::MoneyAmount::isValid
static bool isValid(double value) noexcept
Checks whether a raw amount is finite.
Definition
MoneyAmount.h:28
core::domain::MoneyAmount::MoneyAmount
MoneyAmount()=default
core::domain::MoneyAmount::value
double value() const noexcept
Definition
MoneyAmount.cpp:13
core::domain
Definition
application/import/ImportResult.h:16
core
include
core
domain
values
MoneyAmount.h
Generated by
1.14.0