Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
code_object.hpp
Go to the documentation of this file.
1#pragma once
3#include <boost/tuple/tuple_io.hpp>
4
6
7namespace sysio { namespace chain {
8
9 class code_object : public chainbase::object<code_object_type, code_object> {
11
12 id_type id;
13 digest_type code_hash; //< code_hash should not be changed within a chainbase modifier lambda
14 shared_blob code;
15 uint64_t code_ref_count;
16 uint32_t first_block_used;
17 uint8_t vm_type = 0; //< vm_type should not be changed within a chainbase modifier lambda
18 uint8_t vm_version = 0; //< vm_version should not be changed within a chainbase modifier lambda
19 };
20
21 struct by_code_hash;
24 indexed_by<
25 ordered_unique<tag<by_id>, member<code_object, code_object::id_type, &code_object::id>>,
26 ordered_unique<tag<by_code_hash>,
27 composite_key< code_object,
28 member<code_object, digest_type, &code_object::code_hash>,
29 member<code_object, uint8_t, &code_object::vm_type>,
30 member<code_object, uint8_t, &code_object::vm_version>
31 >
32 >
33 >
34 >;
35
36} } // sysio::chain
37
39
40FC_REFLECT(sysio::chain::code_object, (code_hash)(code)(code_ref_count)(first_block_used)(vm_type)(vm_version))
#define OBJECT_CTOR(...)
Definition types.hpp:39
#define CHAINBASE_SET_INDEX_TYPE(OBJECT_TYPE, INDEX_TYPE)
boost::multi_index_container< Object, Args..., chainbase::node_allocator< Object > > shared_multi_index_container
chainbase::shared_multi_index_container< code_object, indexed_by< ordered_unique< tag< by_id >, member< code_object, code_object::id_type, &code_object::id > >, ordered_unique< tag< by_code_hash >, composite_key< code_object, member< code_object, digest_type, &code_object::code_hash >, member< code_object, uint8_t, &code_object::vm_type >, member< code_object, uint8_t, &code_object::vm_version > > > > > code_index
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
Definition reflect.hpp:311
unsigned int uint32_t
Definition stdint.h:126
unsigned char uint8_t
Definition stdint.h:124
unsigned __int64 uint64_t
Definition stdint.h:136