-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDataProductRetriever.h
More file actions
47 lines (39 loc) · 1.1 KB
/
DataProductRetriever.h
File metadata and controls
47 lines (39 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#if !defined(DataProductRetriever_h)
#define DataProductRetriever_h
#include <string>
#include "DelayedProductRetriever.h"
#include "TaskHolder.h"
class TClass;
namespace cce::tf {
class DataProductRetriever {
public:
DataProductRetriever(int iIndex,
void** iAddress,
std::string iName,
TClass* iClass,
DelayedProductRetriever* iDelayed):
address_(iAddress),
name_(std::move(iName)),
class_(iClass),
delayedReader_(iDelayed),
index_(iIndex){}
void** address() const {return address_; }
size_t size() const { return size_; }
std::string const& name() const { return name_;}
TClass* classType() const { return class_;}
void setAddress(void** iAddress) { address_ = iAddress; }
void setSize(size_t iSize) { size_ = iSize;}
void getAsync(TaskHolder iCallback) {
delayedReader_->getAsync(*this, index_, std::move(iCallback));
}
int index() const { return index_;}
private:
void** address_;
size_t size_ = 0;
std::string name_;
TClass* class_;
DelayedProductRetriever* delayedReader_;
int index_;
};
}
#endif