gramods
Loading...
Searching...
No Matches
TimeSampleTracker.hh
1
2#ifndef GRAMODS_TRACK_TIMESAMPLETRACKER
3#define GRAMODS_TRACK_TIMESAMPLETRACKER
4
5#include <gmTrack/TrackerBase.hh>
6
7#include <gmCore/OFactory.hh>
8
9BEGIN_NAMESPACE_GMTRACK;
10
28template<class TYPE> class TimeSampleTracker : public TrackerBase<TYPE> {
29
30protected:
31 struct Impl;
32 std::unique_ptr<Impl> _impl;
33
34public:
35 TimeSampleTracker();
36 virtual ~TimeSampleTracker();
37
48 void addTime(double seconds);
49
60 void addKey(std::string key);
61
71 void addValue(TYPE state);
72
73 void addKeyValue(std::string key, TYPE value) {
74 addKey(key);
75 addValue(value);
76 }
77
81 std::optional<typename TrackerBase<TYPE>::State> get() override;
82};
83
84END_NAMESPACE_GMTRACK;
85
86#endif
void addValue(TYPE state)
Adds the value for a sample.
Definition TimeSampleTracker.impl.hh:216
void addTime(double seconds)
Adds a time sample in seconds, from the start of the program.
Definition TimeSampleTracker.impl.hh:220
std::optional< typename TrackerBase< TYPE >::State > get() override
Definition TimeSampleTracker.impl.hh:224
void addKey(std::string key)
Adds an key string for a sample.
Definition TimeSampleTracker.impl.hh:212
The base of trackers of pose, float, float2 or bool data.
Definition TrackerBase.hh:30
Definition TimeSampleTracker.impl.hh:15