this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode.
More...
#include <symbol_table.hpp>
this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode.
Definition at line 45 of file symbol_table.hpp.
◆ symbol_table_t() [1/2]
theo::recomp::symbol_table_t::symbol_table_t |
( |
| ) |
|
|
inline |
◆ symbol_table_t() [2/2]
theo::recomp::symbol_table_t::symbol_table_t |
( |
const std::vector< decomp::symbol_t > && |
syms | ) |
|
this constructor will populate the m_table private field with symbols.
- Parameters
-
◆ for_each()
void theo::recomp::symbol_table_t::for_each |
( |
std::function< void(decomp::symbol_t &sym)> |
fn | ) |
|
this function is a wrapper function that allows you to get at each entry in the symbol table by reference.
- Parameters
-
fn | a callback function that will be called for each symbol |
◆ put_symbol()
add symbol to m_table
- Parameters
-
◆ put_symbols()
void theo::recomp::symbol_table_t::put_symbols |
( |
std::vector< decomp::symbol_t > & |
syms | ) |
|
add a vector of symbol to m_table
- Parameters
-
◆ size()
std::uint32_t theo::recomp::symbol_table_t::size |
( |
| ) |
|
returns the size of the symbol table.
- Returns
- returns the size of the symbol table.
◆ sym_from_alloc()
std::optional<decomp::symbol_t*> theo::recomp::symbol_table_t::sym_from_alloc |
( |
std::uintptr_t |
allocated_at | ) |
|
returns an optional pointer to a symbol given its allocation location.
- Parameters
-
allocated_at | the address where the symbol is allocated at. |
- Returns
- returns an optional pointer to a theo::decomp::symbol_t
◆ sym_from_hash()
std::optional<decomp::symbol_t*> theo::recomp::symbol_table_t::sym_from_hash |
( |
std::size_t |
hash | ) |
|
returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its name) the hash is produced by theo::decomp::symbol_t::hash
- Parameters
-
hash | hashcode of the symbol to get from the symbol table... |
- Returns
- returns an optional pointer to a theo::decomp::symbol_t
The documentation for this class was generated from the following file: