You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Theodosius/include/comp/symbol_table.hpp

26 lines
633 B

#pragma once
#include <functional>
#include <map>
#include <vector>
#include <decomp/symbol.hpp>
namespace theo::comp {
class symbol_table_t {
public:
symbol_table_t();
symbol_table_t(const std::vector<decomp::symbol_t>&& syms);
void add_symbol(decomp::symbol_t& sym);
void add_symbols(std::vector<decomp::symbol_t>& syms);
void update(std::string& name, decomp::symbol_t& sym);
void update(std::string& name, std::uintptr_t location);
void for_each(std::function<bool(decomp::symbol_t& sym)> fn);
std::uint32_t size();
private:
std::map<std::string, decomp::symbol_t> m_table;
};
} // namespace theo::comp