XX CMake Package
Loading...
Searching...
No Matches
XXDoubleBuffer.h
Go to the documentation of this file.
1#ifndef XXDoubleBufferH
2#define XXDoubleBufferH
3
4namespace XX
5{
8
9 template <typename DataType>
11 {
12 public:
13 DoubleBuffer(const DataType& init1 = DataType(), const DataType& init2 = DataType());
14
15 public:
16 void swap();
17
18 DataType& current();
19 const DataType& current() const;
20
21 DataType& previous();
22
23 private:
24 DataType buffer[2];
25 bool firstIsCurrent;
26 };
27} // namespace XX
28
29#ifndef XXDoubleBufferHPP
30#include "XXDoubleBuffer.hpp"
31#endif // NOT XXDoubleBufferHPP
32
33#endif // NOT XXDoubleBufferH
DataType & current()
DoubleBuffer(const DataType &init1=DataType(), const DataType &init2=DataType())
const DataType & current() const
DataType & previous()
Definition XXPopulatedAbstract.h:11