OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
parsec/agent/interface.cpp
Go to the documentation of this file.
1// Copyright (c) 2021 MIT Digital Currency Initiative,
2// Federal Reserve Bank of Boston
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6#include "interface.hpp"
7
8namespace cbdc::parsec::agent {
10 parameter_type param,
11 exec_callback_type result_callback)
12 : m_function(std::move(function)),
13 m_param(std::move(param)),
14 m_result_callback(std::move(result_callback)) {}
15
16 auto interface::get_function() const -> runtime_locking_shard::key_type {
17 return m_function;
18 }
19
21 return m_param;
22 }
23
25 return m_result_callback;
26 }
27}
Buffer to store and retrieve byte data.
Definition buffer.hpp:15
auto get_result_callback() const -> exec_callback_type
Return the result callback function stored by this agent.
interface(const interface &)=delete
std::function< void(exec_return_type)> exec_callback_type
Callback function type with function execution result.
auto get_param() const -> parameter_type
Return the function parameter managed by this agent.
auto get_function() const -> runtime_locking_shard::key_type
Return the key of the function bytecode managed by this agent.