TS_CPP
An efficient & easy to use implementation of a Symbol table used in most compilers
Loading...
Searching...
No Matches
TSManager.h
1#ifndef TS_TSMANAGER_H
2#define TS_TSMANAGER_H
3
4#include "string"
5#include "list"
6#include "unordered_map"
7#include "cstring"
8
9#include "TSConfig.h"
10#include "SymbolTable.h"
11
12
19namespace TS_CPP {
20
29{
30public:
31
36 explicit TSManager(int firstID);
37
42 TSManager();
43
48 ~TSManager();
49
55 SymbolTable* createNewTable(const std::string& tableName);
56
62
68 SymbolTable* getTable(int id);
69
75 SymbolTable* searchTable(const std::string& tableName);
76
82 bool deleteTable(int id);
83
90 Entry* searchAllTablesForEntryWithId(int id, int* tableId = nullptr);
91
97 std::list<SymbolTable*>& _getTablesStorage();
98
99private:
100
102 int lastTableID;
103
105 int lastEntryID;
106
108 std::list<SymbolTable*> symbolTableList;
109};
110
111}
112
113#include "TSUtils.h"
114
115#endif //TS_TSMANAGER_H
Definition Entry.h:19
SymbolTable * createNewTable()
Definition TSManager.cpp:19
bool deleteTable(int id)
Definition TSManager.cpp:87
SymbolTable * createNewTable(const std::string &tableName)
std::list< SymbolTable * > & _getTablesStorage()
SymbolTable * searchTable(const std::string &tableName)
Definition TSManager.cpp:61
Entry * searchAllTablesForEntryWithId(int id, int *tableId=nullptr)
SymbolTable * getTable(int id)
Definition TSManager.cpp:35