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