-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBufferBlockADT.h
executable file
·51 lines (36 loc) · 1 KB
/
BufferBlockADT.h
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
/*
* File: BufferBlock.hpp
* Author: Professor Terri Sipantzi
*
* Created on August 25, 2012, 8:49 AM
*/
#ifndef BUFFERBLOCKADT_H
#define BUFFERBLOCKADT_H
#include <iostream>
#include <string>
using namespace std;
class BufferblockADT {
private:
//Instance variables:
// int blockID;
// char* block;
public:
//sz is the size of the character array data
//points to.
BufferblockADT() {}
BufferblockADT(char* data, int sz = 4096) {}
virtual ~BufferblockADT() {}
//read the block from pos to pos + sz-1 (or to the end of the block)
virtual void getData(int pos, int sz, char* data) = 0;
//setID
virtual void setID(int id) = 0;
//getID
virtual int getID() const = 0;
//getBlocksize
virtual int getBlocksize() const = 0;
//return the block
virtual char* getBlock() const = 0;
//set the block
virtual void setBlock(char* blk) = 0;
};
#endif /* BUFFERBLOCKADT_H */