25#define OBJECT_CTOR1(NAME) \
28 template<typename Constructor, typename Allocator> \
29 NAME(Constructor&& c, chainbase::allocator<Allocator>) \
31#define OBJECT_CTOR2_MACRO(x, y, field) ,field(a)
32#define OBJECT_CTOR2(NAME, FIELDS) \
35 template<typename Constructor, typename Allocator> \
36 NAME(Constructor&& c, chainbase::allocator<Allocator> a) \
37 : id(0) BOOST_PP_SEQ_FOR_EACH(OBJECT_CTOR2_MACRO, _, FIELDS) \
39#define OBJECT_CTOR(...) BOOST_PP_OVERLOAD(OBJECT_CTOR, __VA_ARGS__)(__VA_ARGS__)
41#define _V(n, v) fc::mutable_variant_object(n, v)
43namespace sysio {
namespace chain {
46 using std::unordered_map;
49 using std::shared_ptr;
51 using std::unique_ptr;
55 using std::enable_shared_from_this;
72 using fc::flat_multimap;
88 template<
typename K,
typename V>
108 template <
typename InputIterator>
265 auto insert_itr = std::upper_bound(exts.begin(), exts.end(), eid, [](
uint16_t id,
const auto& ext){
266 return id < ext.first;
269 return exts.emplace(insert_itr, eid, std::move(data));
273 template<
typename Container>
302 template<
typename Container>
310 static_assert( std::is_enum<T>::value,
"enum_hash can only be used on enumeration types" );
316 return std::hash<underlying_type>{}(
static_cast<underlying_type>(t) );
326 template<
typename... Ts>
331 template<
typename ResultVariant>
333 -> std::optional<extract_match>
339 template<
typename T,
typename... Rest>
344 template<
typename ResultVariant>
346 -> std::optional<extract_match>
348 if(
id == head_t::extension_id() ) {
357 template<
typename T,
typename ... Ts>
359 static constexpr bool value = std::disjunction_v<std::is_same<T, Ts>...>;
362 template<
typename T,
typename ... Ts>
366 template<
typename E,
typename F>
367 static inline auto has_field( F
flags, E
field )
368 -> std::enable_if_t< std::is_integral<F>::value && std::is_unsigned<F>::value &&
369 std::is_enum<E>::value && std::is_same< F, std::underlying_type_t<E> >
::value,
bool>
371 return ( (
flags &
static_cast<F
>(
field)) != 0 );
374 template<
typename E,
typename F>
376 -> std::enable_if_t< std::is_integral<F>::value && std::is_unsigned<F>::value &&
377 std::is_enum<E>::value && std::is_same< F, std::underlying_type_t<E> >
::value, F >
385 template<
class... Ts>
struct overloaded : Ts... {
using Ts::operator()...; };
bip::allocator< char, pinnable_mapped_file::segment_manager > allocator_type
void resize_and_fill(std::size_t new_size, F &&f)
const char * data() const
wraps boost::filesystem::path to provide platform independent path manipulation.
An order-preserving dictionary of variants.
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
end_insert_iterator operator++(int)
end_insert_iterator & operator*()
std::output_iterator_tag iterator_category
end_insert_iterator & operator=(typename Container::const_reference value)
end_insert_iterator & operator++()
end_insert_iterator(Container &c)
shared_blob(shared_blob &&)=default
shared_blob(const allocator_type &a)
shared_blob & operator=(shared_blob &&)=default
shared_blob(InputIterator f, InputIterator l, const allocator_type &a)
shared_blob(const shared_blob &s)=default
shared_blob & operator=(const shared_blob &s)=default
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
DataStream & operator<<(DataStream &ds, const oid< OidType > &oid)
shared_cow_string shared_string
bip::allocator< T, pinnable_mapped_file::segment_manager > allocator
DataStream & operator>>(DataStream &ds, oid< OidType > &oid)
void unpack(Stream &s, std::deque< T > &value)
void pack(Stream &s, const std::deque< T > &value)
constexpr bool is_any_of_v
end_insert_iterator< Container > end_inserter(Container &c)
@ UNUSED_account_transaction_history_object_type
@ block_summary_object_type
@ OBJECT_TYPE_COUNT
Sentry value which contains the number of different object types.
@ account_control_history_object_type
Defined by history_plugin.
@ resource_usage_object_type
@ UNUSED_scope_sequence_object_type
@ index_double_object_type
@ action_history_object_type
Defined by history_plugin.
@ UNUSED_proxy_vote_object_type
@ account_history_object_type
Defined by history_plugin.
@ index_long_double_object_type
@ resource_limits_state_object_type
@ generated_transaction_object_type
@ resource_limits_object_type
@ resource_limits_config_object_type
@ transaction_object_type
@ protocol_state_object_type
@ database_header_object_type
@ UNUSED_producer_votes_object_type
@ account_ram_correction_object_type
@ reversible_block_object_type
@ UNUSED_transaction_history_object_type
@ UNUSED_chain_property_object_type
@ permission_usage_object_type
@ UNUSED_staked_balance_object_type
@ public_key_history_object_type
Defined by history_plugin.
@ permission_link_object_type
@ UNUSED_producer_schedule_object_type
@ global_property_object_type
@ UNUSED_producer_object_type
@ UNUSED_balance_object_type
@ UNUSED_action_code_object_type
@ account_metadata_object_type
@ dynamic_global_property_object_type
auto emplace_extension(extensions_type &exts, uint16_t eid, vector< char > &&data)
boost::interprocess::set< T, std::less< T >, allocator< T > > shared_set
vector< std::pair< uint16_t, vector< char > > > extensions_type
sysio::chain::action_name action_name
unsigned __int128 uint128_t
boost::interprocess::vector< T, allocator< T > > shared_vector
overloaded(Ts...) -> overloaded< Ts... >
boost::interprocess::flat_multimap< K, V, std::less< K >, allocator< std::pair< K, V > > > shared_flat_multimap
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define T(meth, val, expected)
#define FC_REFLECT_EMPTY(TYPE)
serializes a 32 bit signed interger in as few bytes as possible
static auto extract(uint16_t id, const vector< char > &data, ResultVariant &result) -> std::optional< extract_match >
static auto extract(uint16_t id, const vector< char > &data, ResultVariant &result) -> std::optional< extract_match >
static constexpr bool value
typename std::underlying_type< T >::type underlying_type
std::size_t operator()(T t) const
Immutable except for fc::from_variant.
bool operator()(const fc::sha256 &lhs, const fc::sha256 &rhs) const
#define MAX_SIZE_OF_BYTE_ARRAYS