-
Notifications
You must be signed in to change notification settings - Fork 0
/
rle.h
46 lines (38 loc) · 1.18 KB
/
rle.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
#pragma once
// *******************************************************************************************
// This file is a part of CoMSA software distributed under GNU GPL 3 licence.
// The homepage of the CoMSA project is http://sun.aei.polsl.pl/REFRESH/CoMSA
//
// Author : Sebastian Deorowicz
// Version: 1.2
// Date : 2018-10-04
// *******************************************************************************************
#include <vector>
#include "queue.h"
#include "defs.h"
// *******************************************************************************************
//
// *******************************************************************************************
class CRLE
{
CRegisteringPriorityQueue<string> *in;
CRegisteringPriorityQueue<string> *out;
stage_mode_t stage_mode;
void forward();
void reverse();
void copy_forward();
void copy_reverse();
void emit_code(string &dest, int cnt, int offset);
public:
CRLE(CRegisteringPriorityQueue<string> *_in, CRegisteringPriorityQueue<string> *_out, stage_mode_t _stage_mode) :
in(_in), out(_out), stage_mode(_stage_mode)
{
if (!in || !out)
throw "No I/O queues";
};
~CRLE()
{
}
void operator()();
};
// EOF