BPNGClientLib
Library for accessing the Telemotive data logger devices
RdbEventList.hh
Go to the documentation of this file.
1 //************************************************************
2 //
3 // RdbEventList.hh
4 //
9 //************************************************************
10 
11 #ifndef RDBEVENTLIST_HH
12 #define RDBEVENTLIST_HH
13 
14 #include <vector>
15 #include <string>
16 
17 #include "BPNGDefines.h"
18 #include "RdbDefines.h"
19 
21 
29 struct RdbEvent2
30 {
31  RdbEvent2(const IRdbEvent *rdbEvent)
32  : type(rdbEvent->getType()),
33  uniqueID(rdbEvent->getUniqueId()),
34  timeStamp(rdbEvent->getTimeStamp()),
35  timeZone(rdbEvent->getTimeZone()),
36  index(rdbEvent->getIndex()),
37  comment(rdbEvent->getComment())
38  {
39  }
40 
41  RdbEventType type;
42  uint64_t uniqueID;
43  uint64_t timeStamp;
44  std::string timeZone;
45  int index;
46  std::string comment;
47 };
48 
49 
51 
60 class RdbEventList : public std::vector<RdbEvent2>
61 {
62 public:
63 
64  RdbEventList(const IRdbEventList *list)
65  {
66  const size_t size = list->getSize();
67  reserve(size);
68  for (size_t i = 0; i < size; ++i)
69  {
70  this->push_back(RdbEvent2(list->getEvent(i)));
71  }
72  }
73 };
74 
75 #endif // RDBEVENTLIST_HH
Interface to an RDB event.
Definition: RdbDefines.h:65
Implementation class for a wrapper of IRdbEvent using STL classes.
Definition: RdbEventList.hh:29
RdbEventType
Definition: RdbDefines.h:39
Defines for Telemotive Client Library.
virtual uint64_t WINAPI getUniqueId() const =0
virtual const IRdbEvent *WINAPI getEvent(size_t index) const =0
Returns a pointer to the IRdbEvent at index.
virtual uint64_t WINAPI getTimeStamp() const =0
Returns the event&#39;s time stamp in usec since 01.01.1970 UTC.
virtual int WINAPI getIndex() const =0
Returns the index of this event. Only used for marker events.
virtual const char *WINAPI getTimeZone() const =0
Implementation class for a wrapper of IRdbEventList using STL classes.
Definition: RdbEventList.hh:60
virtual RdbEventType WINAPI getType() const =0
Get type of event.
Public interfaces for Telemotive Reference Database access.
virtual const char *WINAPI getComment() const =0
Interface to a list of rdb events.
Definition: RdbDefines.h:96
virtual size_t WINAPI getSize() const =0
Returns the size of the event list.