-
Notifications
You must be signed in to change notification settings - Fork 2
/
BdfNamedList.hpp
60 lines (46 loc) · 1.17 KB
/
BdfNamedList.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
50
51
52
53
54
55
56
57
58
59
60
#ifndef BDFNAMEDLIST_HPP_
#define BDFNAMEDLIST_HPP_
#include "Bdf.hpp"
#include <iostream>
#include <vector>
#include <string>
namespace Bdf
{
class BdfNamedList
{
private:
class Item;
class Item
{
public:
Item* next;
BdfObject* object;
int key;
Item(int key, BdfObject* object, Item* next);
virtual ~Item();
};
Item* start;
Item** end;
BdfLookupTable* lookupTable;
public:
BdfNamedList(BdfLookupTable* lookupTable);
BdfNamedList(BdfLookupTable* lookupTable, const char* data, int size);
BdfNamedList(BdfLookupTable* lookupTable, BdfStringReader* sr);
virtual ~BdfNamedList();
void getLocationUses(int* locations);
int serializeSeeker(int* locations);
int serialize(char *data, int* locations);
void serializeHumanReadable(std::ostream &stream, BdfIndent indent, int upto);
BdfNamedList* clear();
BdfObject* get(int key);
BdfObject* get(std::string key);
BdfNamedList* set(std::string key, BdfObject* value);
BdfNamedList* set(int key, BdfObject* value);
BdfObject* remove(std::string key);
BdfObject* remove(int key);
std::vector<int> keys();
bool exists(std::string key);
bool exists(int key);
};
}
#endif