-
Notifications
You must be signed in to change notification settings - Fork 2
/
BdfLookupTable.hpp
49 lines (39 loc) · 902 Bytes
/
BdfLookupTable.hpp
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
#ifndef BDFLOOKUPTABLE_HPP_
#define BDFLOOKUPTABLE_HPP_
#include "Bdf.hpp"
#include <iostream>
#include <vector>
#include <string>
namespace Bdf
{
class BdfLookupTable
{
private:
class Item;
class Item
{
public:
std::string key;
Item* next;
};
Item* keys_start;
Item** keys_endp;
Item** keys_mapped;
unsigned int keys_size_mapped;
unsigned int keys_size;
BdfReader* reader;
void remapKeys();
public:
BdfLookupTable(BdfReader* reader);
BdfLookupTable(BdfReader* reader, const char* data, int size);
virtual ~BdfLookupTable();
unsigned int getLocation(std::string id);
std::string getName(unsigned int id);
int serialize(char* database, int* locations, int locations_size);
int serializeSeeker(int* locations, int locations_size);
void serializeGetLocations(int* locations);
bool hasKeyLocation(unsigned int key);
int size();
};
}
#endif