AusweisApp2
Lade ...
Suche ...
Keine Treffer
CallCost.h
gehe zur Dokumentation dieser Datei
1
7#pragma once
8
9#include <QDebug>
10#include <QJsonValue>
11
12
13namespace governikus
14{
15
17{
18 friend bool operator==(const CallCost& pLeft, const CallCost& pRight);
19
20 private:
21 int mFreeSeconds;
22 double mLandlineCentsPerMinute;
23 double mLandlineCentsPerCall;
24 double mMobileCentsPerMinute;
25 double mMobileCentsPerCall;
26
27 public:
28 explicit CallCost(int pFreeSeconds = 0, double pLandlineCentsPerMinute = 0.0, double pLandlineCentsPerCall = 0.0, double pMobileCentsPerMinute = 0.0, double pMobileCentsPerCall = 0.0);
29 explicit CallCost(const QJsonValue& pJson);
30
31 void load();
32 void save();
33
34 [[nodiscard]] bool isNull() const;
35 [[nodiscard]] int getFreeSeconds() const;
36 [[nodiscard]] double getLandlineCentsPerMinute() const;
37 [[nodiscard]] double getLandlineCentsPerCall() const;
38 [[nodiscard]] double getMobileCentsPerMinute() const;
39 [[nodiscard]] double getMobileCentsPerCall() const;
40};
41
42
43inline bool operator==(const CallCost& pLeft, const CallCost& pRight)
44{
45 return &pLeft == &pRight || (
46 pLeft.mFreeSeconds == pRight.mFreeSeconds &&
47 pLeft.mLandlineCentsPerMinute == pRight.mLandlineCentsPerMinute &&
48 pLeft.mLandlineCentsPerCall == pRight.mLandlineCentsPerCall &&
49 pLeft.mMobileCentsPerMinute == pRight.mMobileCentsPerMinute &&
50 pLeft.mMobileCentsPerCall == pRight.mMobileCentsPerCall);
51}
52
53
54} // namespace governikus
55
56QDebug operator<<(QDebug pDbg, const governikus::CallCost& pCallCost);
QDebug operator<<(QDebug pDbg, const governikus::CallCost &pCallCost)
Definition: CallCost.cpp:79
Definition: CallCost.h:17
double getLandlineCentsPerCall() const
Definition: CallCost.cpp:61
double getMobileCentsPerCall() const
Definition: CallCost.cpp:73
int getFreeSeconds() const
Definition: CallCost.cpp:49
bool isNull() const
Definition: CallCost.cpp:43
double getMobileCentsPerMinute() const
Definition: CallCost.cpp:67
double getLandlineCentsPerMinute() const
Definition: CallCost.cpp:55
friend bool operator==(const CallCost &pLeft, const CallCost &pRight)
Definition: CallCost.h:43
A simple template renderer.
Definition: ActivationContext.h:15
bool operator==(const CommandApdu &pLeft, const CommandApdu &pRight)
Definition: CommandApdu.h:102