 |
Ethereum
PoC-8
The C++ Implementation of Ethereum
|
Go to the documentation of this file.
24 #include <unordered_map>
57 static void unregisterPricer(std::string
const& _name) { get()->m_pricers.erase(_name); }
62 std::unordered_map<std::string, PrecompiledExecutor> m_execs;
63 std::unordered_map<std::string, PrecompiledPricer> m_pricers;
64 static PrecompiledRegistrar* s_this;
68 #define ETH_REGISTER_PRECOMPILED(Name) static std::pair<bool, bytes> __eth_registerPrecompiledFunction ## Name(bytesConstRef _in); static PrecompiledExecutor __eth_registerPrecompiledFactory ## Name = ::dev::eth::PrecompiledRegistrar::registerExecutor(#Name, &__eth_registerPrecompiledFunction ## Name); static std::pair<bool, bytes> __eth_registerPrecompiledFunction ## Name
69 #define ETH_REGISTER_PRECOMPILED_PRICER(Name) static bigint __eth_registerPricerFunction ## Name(bytesConstRef _in); static PrecompiledPricer __eth_registerPricerFactory ## Name = ::dev::eth::PrecompiledRegistrar::registerPricer(#Name, &__eth_registerPricerFunction ## Name); static bigint __eth_registerPricerFunction ## Name
std::function< std::pair< bool, bytes >(bytesConstRef _in)> PrecompiledExecutor
static PrecompiledPricer registerPricer(std::string const &_name, PrecompiledPricer const &_exec)
Register a pricer. In general just use ETH_REGISTER_PRECOMPILED_PRICER.
static PrecompiledExecutor const & executor(std::string const &_name)
Get the executor object for _name function or.
static void unregisterPricer(std::string const &_name)
Unregister a pricer. Shouldn't generally be necessary.
static PrecompiledExecutor registerExecutor(std::string const &_name, PrecompiledExecutor const &_exec)
Register an executor. In general just use ETH_REGISTER_PRECOMPILED.
static void unregisterExecutor(std::string const &_name)
Unregister an executor. Shouldn't generally be necessary.
std::function< bigint(bytesConstRef _in)> PrecompiledPricer
boost::multiprecision::number< boost::multiprecision::cpp_int_backend<> > bigint
static PrecompiledPricer const & pricer(std::string const &_name)
Get the price calculator object for _name function or.
DEV_SIMPLE_EXCEPTION(NoHashRecorded)