Theodosius  v3.0
Jit linker, mapper, obfuscator, and mutator
Public Member Functions | List of all members
theo::recomp::symbol_table_t Class Reference

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>

Public Member Functions

 symbol_table_t ()
 default constructor. does nothing. More...
 
 symbol_table_t (const std::vector< decomp::symbol_t > &&syms)
 this constructor will populate the m_table private field with symbols. More...
 
void put_symbol (decomp::symbol_t &sym)
 add symbol to m_table More...
 
void put_symbols (std::vector< decomp::symbol_t > &syms)
 add a vector of symbol to m_table More...
 
std::optional< decomp::symbol_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 More...
 
std::optional< decomp::symbol_t * > sym_from_alloc (std::uintptr_t allocated_at)
 returns an optional pointer to a symbol given its allocation location. More...
 
void 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. More...
 
std::uint32_t size ()
 returns the size of the symbol table. More...
 

Detailed Description

this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode.

Constructor & Destructor Documentation

◆ symbol_table_t() [1/2]

theo::recomp::symbol_table_t::symbol_table_t ( )
inline

default constructor. does nothing.

◆ 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
symsvector of decomp::symbol_t

Member Function Documentation

◆ 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
fna callback function that will be called for each symbol

◆ put_symbol()

void theo::recomp::symbol_table_t::put_symbol ( decomp::symbol_t sym)

add symbol to m_table

Parameters
symsymbol to be added.

◆ 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
syms

◆ 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_atthe 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
hashhashcode 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 files: