vdr-plugin-softhddevice-drm-gles
1.4.0
pool.h
Go to the documentation of this file.
1
18
#ifndef __SOFTHDPOOL_H
19
#define __SOFTHDPOOL_H
20
21
#include <vector>
22
#include <memory>
23
24
template
<
typename
T>
25
class
cPool
{
26
protected
:
27
std::vector<std::unique_ptr<T>>
buffer
;
28
size_t
currentIndex
= 0;
29
30
public
:
31
cPool
(
size_t
size) {
32
buffer
.reserve(size);
33
34
for
(
size_t
i = 0; i < size; ++i) {
35
buffer
.emplace_back(std::make_unique<T>());
36
}
37
}
38
};
39
40
#endif
cPool
Definition:
pool.h:25
cPool::cPool
cPool(size_t size)
Definition:
pool.h:31
cPool::buffer
std::vector< std::unique_ptr< T > > buffer
Definition:
pool.h:27
cPool::currentIndex
size_t currentIndex
Definition:
pool.h:28
Generated by
1.9.4