librcsb-core-wrapper  1.000
BlockIO.h
Go to the documentation of this file.
1 //$$FILE$$
2 //$$VERSION$$
3 //$$DATE$$
4 //$$LICENSE$$
5 
6 
7 #ifndef BLOCKIO_H
8 #define BLOCKIO_H
9 
10 #include <rcsb/rcsb_types.h>
11 
12 const unsigned int WORDSPERBLOCK = 2048;
13 const unsigned int BLKSIZE = 8192;
14 
15 class BlockIO
16 {
17 public:
18  BlockIO();
19  ~BlockIO();
20 
21  void AssociateBuffer(char** newBuffer);
22 
23  unsigned int ReadBlock(const int fd, const UInt32 blockNum);
24  unsigned int WriteBlock(const int fd, const UInt32 blockNum);
25 
26 private:
27  UInt32 _buffer[WORDSPERBLOCK]; // A buffer for reading/writing blocks
28 
29 };
30 
31 #endif
32