mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
More missing files.
This commit is contained in:
25
lib/fluxmap.h
Normal file
25
lib/fluxmap.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef FLUXMAP_H
|
||||
#define FLUXMAP_H
|
||||
|
||||
class Fluxmap
|
||||
{
|
||||
public:
|
||||
uint8_t operator[](int index) const
|
||||
{
|
||||
return _intervals.at(index);
|
||||
}
|
||||
|
||||
nanoseconds_t duration() const { return _duration; }
|
||||
const uint8_t* ptr() const { return &_intervals.at(0); }
|
||||
int bytes() const { return _intervals.size(); }
|
||||
|
||||
Fluxmap& appendIntervals(std::vector<uint8_t>& intervals);
|
||||
Fluxmap& appendIntervals(const uint8_t* ptr, size_t len);
|
||||
|
||||
private:
|
||||
nanoseconds_t _duration = 0;
|
||||
int _ticks = 0;
|
||||
std::vector<uint8_t> _intervals;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user