OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
circular.hpp
Go to the documentation of this file.
1
6#ifndef OPENEV_CONTAINERS_CIRCULAR_HPP
7#define OPENEV_CONTAINERS_CIRCULAR_HPP
8
10#include "openev/core/types.hpp"
11#include <boost/circular_buffer.hpp>
12#include <opencv2/core/types.hpp>
13#include <utility>
14
15namespace ev {
16[[maybe_unused]] constexpr bool USING_CIRCULAR_HPP = true;
17
23template <typename T>
24class CircularBuffer_ : public boost::circular_buffer<Event_<T>>, public AbstractContainer_<CircularBuffer_<T>, T> {
25 using boost::circular_buffer<Event_<T>>::circular_buffer;
26 using ResultType = TimeType;
27
28public:
35 template <typename... Args>
36 inline void emplace_back(Args &&...args) {
37 boost::circular_buffer<Event_<T>>::push_back(Event_<T>(std::forward<Args>(args)...));
38 }
39
46 template <typename... Args>
47 inline void emplace_front(Args &&...args) {
48 boost::circular_buffer<Event_<T>>::push_front(Event_<T>(std::forward<Args>(args)...));
49 }
50};
56} // namespace ev
57
58#endif // OPENEV_CONTAINERS_CIRCULAR_HPP
Statistics shared by all the event containers.
CircularBufferi CircularBuffer
Definition circular.hpp:55
CircularBuffer_< float > CircularBufferf
Definition circular.hpp:53
CircularBuffer_< long > CircularBufferl
Definition circular.hpp:52
CircularBuffer_< int > CircularBufferi
Definition circular.hpp:51
CircularBuffer_< double > CircularBufferd
Definition circular.hpp:54
This is an auxiliary class. This class cannot be instanced.
Definition abstract-container.hpp:31
This class extends boost::circular_buffer to implement event circular buffers. For more information,...
Definition circular.hpp:24
void emplace_front(Args &&...args)
Construct an Event_<T> in-place at the front of the buffer.
Definition circular.hpp:47
void emplace_back(Args &&...args)
Construct an Event_<T> in-place at the back of the buffer.
Definition circular.hpp:36
This class extends cv::Point_<T> for event data. For more information, please refer here.
Definition types.hpp:86
Basic event-based vision structures based on OpenCV components.