RecordMgr.h 1.02 KB
Newer Older
nkindlon's avatar
nkindlon committed
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * RecordMgr.h
 *
 *  Created on: Jan 9, 2013
 *      Author: nek3d
 */

#ifndef RECORDMGR_H_
#define RECORDMGR_H_

//include headers for all Records and derivative classes
#include "Record.h"
nkindlon's avatar
nkindlon committed
13
#include "EmptyRecord.h"
nkindlon's avatar
nkindlon committed
14
15
16
17
18
19
20
21
22
23
#include "Bed3Interval.h"
#include "Bed4Interval.h"
#include "Bed5Interval.h"
#include "BedGraphInterval.h"
#include "Bed6Interval.h"
#include "BedPlusInterval.h"
#include "Bed12Interval.h"
#include "BamRecord.h"
#include "VcfRecord.h"
#include "GffRecord.h"
24
#include "GffPlusRecord.h"
nkindlon's avatar
nkindlon committed
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

#include "FileRecordTypeChecker.h"

class Record;

class RecordMgr {
public:
	RecordMgr(FileRecordTypeChecker::RECORD_TYPE recType, int blockSize = 512);
	~RecordMgr();

	Record *allocateRecord();

	//WARNING: Even though the deleteRecord method takes a const pointer, user should only pass objects
	//that are safe to delete! Const-ness will be cast away internally.
	void deleteRecord(const Record *);

private:
	FileRecordTypeChecker::RECORD_TYPE _recordType;
	void *_freeList;
	int _freeListBlockSize;
};



#endif /* RECORDMGR_H_ */