herald  2.0.0
encounter.h
1 // Copyright 2020-2021 Herald Project Contributors
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #ifndef HERALD_ENCOUNTER_H
6 #define HERALD_ENCOUNTER_H
7 
8 #include "date.h"
9 #include "proximity.h"
10 #include "payload_data.h"
11 
12 #include <string>
13 
14 namespace herald {
15 namespace datatype {
16 
17 class Encounter {
18 public:
19  Encounter(Proximity didMeasure, PayloadData withPayload, Date timestamp);
20  Encounter(Proximity didMeasure, PayloadData withPayload);
21  Encounter(const std::string csvRow);
22  ~Encounter();
23 
24  std::string csvString() const;
25 
26  bool isValid() const;
27 
28  const Proximity& proximity() const;
29  const PayloadData& payload() const;
30  const Date& timestamp() const;
31 
32 private:
33  Date date;
34  Proximity prox;
35  PayloadData payloadData;
36  bool valid;
37 };
38 
39 
40 } // end namespace
41 } // end namespace
42 
43 #endif
Definition: date.h:18
Definition: encounter.h:17
Definition: payload_data.h:13
Acts as a non-global memory arena for arbitrary classes.
Definition: aggregates.h:15
Definition: proximity.h:17