-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbag_simplelayerdescriptor.h
More file actions
57 lines (41 loc) · 1.66 KB
/
bag_simplelayerdescriptor.h
File metadata and controls
57 lines (41 loc) · 1.66 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
48
49
50
51
52
53
54
55
56
#ifndef BAG_SIMPLELAYERDESCRIPTOR_H
#define BAG_SIMPLELAYERDESCRIPTOR_H
#include "bag_config.h"
#include "bag_fordec.h"
#include "bag_layerdescriptor.h"
#include "bag_types.h"
#include <memory>
namespace BAG {
//! Describe a simple layer.
class BAG_API SimpleLayerDescriptor final : public LayerDescriptor
{
public:
static std::shared_ptr<SimpleLayerDescriptor> create(const Dataset& dataset,
LayerType type, uint32_t rows, uint32_t cols,
uint64_t chunkSize, int compressionLevel);
static std::shared_ptr<SimpleLayerDescriptor> open(const Dataset& dataset,
LayerType type, uint32_t rows, uint32_t cols);
SimpleLayerDescriptor(const SimpleLayerDescriptor&) = delete;
SimpleLayerDescriptor(SimpleLayerDescriptor&&) = delete;
SimpleLayerDescriptor& operator=(const SimpleLayerDescriptor&) = delete;
SimpleLayerDescriptor& operator=(SimpleLayerDescriptor&&) = delete;
bool operator==(const SimpleLayerDescriptor &rhs) const noexcept {
return m_elementSize == rhs.m_elementSize;
}
bool operator!=(const SimpleLayerDescriptor &rhs) const noexcept {
return !(rhs == *this);
}
protected:
SimpleLayerDescriptor(uint32_t id, LayerType type,
uint32_t rows, uint32_t cols, uint64_t chunkSize,
int compressionLevel);
SimpleLayerDescriptor(const Dataset& dataset, LayerType type,
uint32_t rows, uint32_t cols);
private:
DataType getDataTypeProxy() const noexcept override;
uint8_t getElementSizeProxy() const noexcept override;
//! The size of a single node in the HDF5 file.
uint8_t m_elementSize = 0;
};
} // namespace BAG
#endif // BAG_SIMPLELAYERDESCRIPTOR_H