File: BlockIO.h

package info (click to toggle)
librcsb-core-wrapper 1.005-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,576 kB
  • sloc: xml: 122,915; cpp: 25,250; ansic: 3,736; makefile: 1,033; sh: 772; lex: 294; yacc: 235; perl: 213; python: 121; csh: 30
file content (32 lines) | stat: -rw-r--r-- 520 bytes parent folder | download | duplicates (6)
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
//$$FILE$$
//$$VERSION$$
//$$DATE$$
//$$LICENSE$$


#ifndef BLOCKIO_H
#define BLOCKIO_H

#include "rcsb_types.h"

const unsigned int WORDSPERBLOCK = 2048;
const unsigned int BLKSIZE = 8192;

class BlockIO
{
public:
    BlockIO();
    ~BlockIO();

    void AssociateBuffer(char** newBuffer);

    unsigned int ReadBlock(const int fd, const UInt32 blockNum);
    unsigned int WriteBlock(const int fd, const UInt32 blockNum);

private:
    UInt32 _buffer[WORDSPERBLOCK]; // A buffer for reading/writing blocks

};

#endif