MCPcopy Create free account
hub / github.com/TUC-ProAut/libRSF / DataStream

Class DataStream

include/DataStream.h:45–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 /** stream of objects with ticked timestamps */
44 template<typename ObjectType>
45 class DataStream : private std::multimap<double, ObjectType>
46 {
47 public:
48 DataStream() = default;
49 virtual ~DataStream() = default;
50
51 /** define base class */
52 typedef typename std::multimap<double, ObjectType> BaseClass;
53
54 /** use the types of the base class */
55 typedef typename BaseClass::iterator iterator;
56 typedef typename BaseClass::const_iterator const_iterator;
57 typedef typename BaseClass::size_type size_type;
58
59 /** implement all functions with a fixed tick size for the double keys */
60 iterator find (const double &Time)
61 {
62 return BaseClass::find(roundToTick(Time));
63 }
64
65 const_iterator find (const double &Time) const
66 {
67 return BaseClass::find(roundToTick(Time));
68 }
69
70 size_type count (const double &Time) const
71 {
72 return BaseClass::count(roundToTick(Time));
73 }
74
75 iterator lower_bound (const double &Time)
76 {
77 return BaseClass::lower_bound(roundToTick(Time));
78 }
79
80 const_iterator lower_bound (const double &Time) const
81 {
82 return BaseClass::lower_bound(roundToTick(Time));
83 }
84
85 iterator upper_bound (const double &Time)
86 {
87 return BaseClass::upper_bound(roundToTick(Time));
88 }
89
90 const_iterator upper_bound (const double &Time) const
91 {
92 return BaseClass::upper_bound(roundToTick(Time));
93 }
94
95 std::pair<iterator,iterator> equal_range (const double &Time)
96 {
97 return BaseClass::equal_range(roundToTick(Time));
98 }
99
100 std::pair<const_iterator,const_iterator> equal_range (const double &Time) const
101 {
102 return BaseClass::equal_range(roundToTick(Time));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected