Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
chain_id_type.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace sysio {
6
7 class net_plugin_impl;
8 struct handshake_message;
9
10 namespace chain_apis {
11 class read_only;
12 }
13
14 class chain_plugin;
15
16namespace chain {
17
18 namespace legacy {
19 struct snapshot_global_property_object_v3;
20 struct snapshot_global_property_object_v4;
21 }
22
23 struct chain_id_type : public fc::sha256 {
25
26 template<typename T>
27 inline friend T& operator<<( T& ds, const chain_id_type& cid ) {
28 ds.write( cid.data(), cid.data_size() );
29 return ds;
30 }
31
32 template<typename T>
33 inline friend T& operator>>( T& ds, chain_id_type& cid ) {
34 ds.read( cid.data(), cid.data_size() );
35 return ds;
36 }
37
38 void reflector_init()const;
39
40 private:
41 chain_id_type() = default;
42
43 // Some exceptions are unfortunately necessary:
44 template<typename T>
45 friend T fc::variant::as()const;
46
48
51 friend class block_log;
52 friend struct trim_data;
53 friend class controller;
54 friend struct controller_impl;
59 };
60
61} } // namespace sysio::chain
62
63namespace fc {
64 class variant;
67} // fc
const char * data() const
Definition sha256.cpp:31
size_t data_size() const
Definition sha256.hpp:23
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition variant.hpp:191
T as() const
Definition variant.hpp:327
Maintains global state information about block producer schedules and chain configuration parameters.
namespace sysio::chain
Definition authority.cpp:3
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
void to_variant(const sysio::chain::shared_public_key &var, fc::variant &vo)
Definition authority.cpp:4
#define T(meth, val, expected)
friend T & operator>>(T &ds, chain_id_type &cid)
friend T & operator<<(T &ds, const chain_id_type &cid)