libcryfs/implementations/onblocks/datanodestore/DataLeafNode.h

37 lines
681 B
C
Raw Normal View History

#pragma once
2014-12-13 17:48:02 +01:00
#ifndef BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATANODESTORE_DATALEAFNODE_H_
#define BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATANODESTORE_DATALEAFNODE_H_
#include "DataNode.h"
namespace blobstore {
namespace onblocks {
namespace datanodestore {
class DataInnerNode;
class DataLeafNode: public DataNode {
public:
DataLeafNode(DataNodeView block);
virtual ~DataLeafNode();
static constexpr uint32_t MAX_STORED_BYTES = DataNodeView::DATASIZE_BYTES;
void InitializeNewNode();
void *data();
const void *data() const;
2014-12-10 16:48:00 +01:00
uint32_t numBytes() const;
void resize(uint32_t size);
private:
void fillDataWithZeroesFromTo(off_t begin, off_t end);
};
}
}
}
#endif