-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathTransTable.h
44 lines (33 loc) · 887 Bytes
/
TransTable.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
////////////////////////////////////////////////////////////////////////
//Title: TransTable.h
//Author: Kristina Klinkner
//Date: March 20, 2002
//Description: Header file for TransTable.cpp
//
////////////////////////////////////////////////////////////////////////
#ifndef __TRANS_H
#define __TRANS_H
#include "Common.h"
#include "States.h"
struct TransNode
{
StringElem* stringPtr;
TransNode* nextPtr;
int state;
};
class TransTable
{
private:
TransNode** m_transArray;
TransNode** m_parentArray;
int m_arraySize;
int* m_transCounts;
public:
TransTable(int numStates);
~TransTable();
void setTrans(int transState, StringElem* string, int parentState);
TransNode* WhichStrings(int state);
int getCounts(int state);
void RemoveStringsAndState(int removalState, int removeAdjust, int lowest);
};
#endif