#pragma once #include #include #include namespace theo::recomp { using resolver_t = std::function; using copier_t = std::function; using allocator_t = std::function; class recomp_t { public: explicit recomp_t(decomp::decomp_t* dcmp); explicit recomp_t(decomp::decomp_t* dcmp, allocator_t alloc, copier_t copy, resolver_t resolve); void allocate(); void resolve(); void copy_syms(); void allocator(allocator_t alloc); void copier(copier_t copy); void resolver(resolver_t resolve); std::uintptr_t resolve(const std::string&& sym); private: void gen_reloc_trans(decomp::symbol_t* sym); decomp::decomp_t* m_dcmp; resolver_t m_resolver; copier_t m_copier; allocator_t m_allocator; }; } // namespace theo::comp