Coverage Report

Created: 2021-08-28 18:14

D:\git\skunkworks\herald-for-cpp\herald\src\datatype\encounter.cpp
Line
Count
Source (jump to first uncovered line)
1
//  Copyright 2020-2021 Herald Project Contributors
2
//  SPDX-License-Identifier: Apache-2.0
3
//
4
5
#include "herald/datatype/encounter.h"
6
7
#include <string>
8
9
namespace herald {
10
namespace datatype {
11
12
// PIMPL DEFINITION
13
// class Encounter::Impl {
14
// public:
15
//   Impl();
16
//   Impl(Proximity didMeasure, PayloadData withPayload, Date timestamp);
17
//   ~Impl() = default;
18
19
//   Date date;
20
//   Proximity proximity;
21
//   PayloadData payloadData;
22
//   bool valid;
23
// };
24
25
26
// // PIMPL DECLARATIONS
27
// Encounter::Impl::Impl()
28
//   : date(), proximity(), payloadData(), valid(false)
29
// {
30
//   ;
31
// }
32
33
// Encounter::Impl::Impl(Proximity didMeasure, PayloadData withPayload, Date timestamp)
34
//   : date(timestamp), proximity(didMeasure), payloadData(withPayload), valid(true)
35
// {
36
//   ;
37
// }
38
39
// ENCOUNTER DECLARATIONS
40
41
Encounter::Encounter(Proximity didMeasure, PayloadData withPayload, Date timestamp)
42
  : date(timestamp), prox(didMeasure), payloadData(withPayload), valid(true)
43
1
{
44
1
  ;
45
1
}
46
47
Encounter::Encounter(Proximity didMeasure, PayloadData withPayload)
48
  : date(Date()), prox(didMeasure), payloadData(withPayload), valid(true)
49
0
{
50
0
  ;
51
0
}
52
53
Encounter::Encounter(const std::string csvRow)
54
  : date(), prox(), payloadData(), valid(false)
55
0
{
56
0
  ;
57
0
  // TODO parse the csv
58
0
}
59
60
1
Encounter::~Encounter() = default;
61
62
63
std::string
64
0
Encounter::csvString() const {
65
0
  return ""; // TODO fill this out properly
66
0
}
67
68
bool
69
1
Encounter::isValid() const {
70
1
  return valid;
71
1
}
72
73
const Proximity&
74
Encounter::proximity() const
75
2
{
76
2
  return prox;
77
2
}
78
79
const PayloadData&
80
Encounter::payload() const
81
1
{
82
1
  return payloadData;
83
1
}
84
85
const Date&
86
Encounter::timestamp() const
87
1
{
88
1
  return date;
89
1
}
90
91
} // end namespace
92
} // end namespace