BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface software
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
types.hpp File Reference
#include <memory>
#include <vector>
#include <deque>
#include <cstdint>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/seq/transform.hpp>
#include <boost/preprocessor/seq/elem.hpp>
#include <boost/preprocessor/seq/enum.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/rational.hpp>
#include <fc/container/flat_fwd.hpp>
#include <fc/io/varint.hpp>
#include <fc/io/enum_type.hpp>
#include <fc/crypto/ripemd160.hpp>
#include <fc/crypto/sha1.hpp>
#include <fc/crypto/sha224.hpp>
#include <fc/crypto/sha256.hpp>
#include <fc/crypto/hash160.hpp>
#include <fc/crypto/elliptic.hpp>
#include <fc/reflect/reflect.hpp>
#include <fc/reflect/variant.hpp>
#include <fc/optional.hpp>
#include <fc/safe.hpp>
#include <fc/container/flat.hpp>
#include <fc/string.hpp>
#include <fc/io/datastream.hpp>
#include <fc/io/raw_fwd.hpp>
#include <fc/static_variant.hpp>
#include <graphene/protocol/object_id.hpp>
#include <graphene/protocol/config.hpp>

Go to the source code of this file.

Classes

struct  graphene::protocol::void_t
 
struct  graphene::protocol::public_key_type
 
struct  graphene::protocol::public_key_type::binary_key
 
class  graphene::protocol::pubkey_comparator
 
struct  fc::get_typename< std::shared_ptr< const graphene::protocol::fee_schedule > >
 
struct  fc::get_typename< std::shared_ptr< graphene::protocol::fee_schedule > >
 

Namespaces

 graphene
 
 graphene::protocol
 
 fc
 

Macros

#define GRAPHENE_EXTERNAL_SERIALIZATION(ext, type)
 
#define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION(type)   GRAPHENE_EXTERNAL_SERIALIZATION(extern, type)
 
#define GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION(type)   GRAPHENE_EXTERNAL_SERIALIZATION(/*not extern*/, type)
 
#define GRAPHENE_NAME_TO_OBJECT_TYPE(x, prefix, name)   BOOST_PP_CAT(prefix, BOOST_PP_CAT(name, _object_type))
 
#define GRAPHENE_NAME_TO_ID_TYPE(x, y, name)   BOOST_PP_CAT(name, _id_type)
 
#define GRAPHENE_DECLARE_ID(x, space_prefix_seq, name)
 
#define GRAPHENE_REFLECT_ID(x, id_namespace, name)   FC_REFLECT_TYPENAME(graphene::id_namespace::name)
 
#define GRAPHENE_DEFINE_IDS(id_namespace, object_space, object_type_prefix, names_seq)
 

Typedefs

using graphene::protocol::private_key_type = fc::ecc::private_key
 
using graphene::protocol::chain_id_type = fc::sha256
 
using graphene::protocol::ratio_type = boost::rational< int32_t >
 
using graphene::protocol::block_id_type = fc::ripemd160
 
using graphene::protocol::checksum_type = fc::ripemd160
 
using graphene::protocol::transaction_id_type = fc::ripemd160
 
using graphene::protocol::digest_type = fc::sha256
 
using graphene::protocol::signature_type = fc::ecc::compact_signature
 
using graphene::protocol::share_type = safe< int64_t >
 
using graphene::protocol::weight_type = uint16_t
 

Enumerations

enum  graphene::protocol::asset_issuer_permission_flags {
  graphene::protocol::charge_market_fee = 0x01, graphene::protocol::white_list = 0x02, graphene::protocol::override_authority = 0x04, graphene::protocol::transfer_restricted = 0x08,
  graphene::protocol::disable_force_settle = 0x10, graphene::protocol::global_settle = 0x20, graphene::protocol::disable_confidential = 0x40, graphene::protocol::witness_fed_asset = 0x80,
  graphene::protocol::committee_fed_asset = 0x100, graphene::protocol::lock_max_supply = 0x200, graphene::protocol::disable_new_supply = 0x400, graphene::protocol::disable_mcr_update = 0x800,
  graphene::protocol::disable_icr_update = 0x1000, graphene::protocol::disable_mssr_update = 0x2000
}
 
enum  graphene::protocol::reserved_spaces { graphene::protocol::relative_protocol_ids = 0, graphene::protocol::protocol_ids = 1, graphene::protocol::implementation_ids = 2 }
 

Functions

bool graphene::protocol::is_relative (object_id_type o)
 
void fc::to_variant (const graphene::protocol::public_key_type &var, fc::variant &vo, uint32_t max_depth=2)
 
void fc::from_variant (const fc::variant &var, graphene::protocol::public_key_type &vo, uint32_t max_depth=2)
 
void fc::from_variant (const fc::variant &var, std::shared_ptr< const graphene::protocol::fee_schedule > &vo, uint32_t max_depth=2)
 

Macro Definition Documentation

#define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION (   type)    GRAPHENE_EXTERNAL_SERIALIZATION(extern, type)

Definition at line 73 of file types.hpp.

#define GRAPHENE_DECLARE_ID (   x,
  space_prefix_seq,
  name 
)
Value:
using BOOST_PP_CAT(name, _id_type) = object_id<BOOST_PP_TUPLE_ELEM(2, 0, space_prefix_seq), \
GRAPHENE_NAME_TO_OBJECT_TYPE(x, BOOST_PP_TUPLE_ELEM(2, 1, space_prefix_seq), name)>;
#define GRAPHENE_NAME_TO_OBJECT_TYPE(x, prefix, name)
Definition: types.hpp:76

Definition at line 78 of file types.hpp.

#define GRAPHENE_DEFINE_IDS (   id_namespace,
  object_space,
  object_type_prefix,
  names_seq 
)
Value:
namespace graphene { namespace id_namespace { \
\
enum BOOST_PP_CAT(object_type_prefix, object_type) { \
BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(GRAPHENE_NAME_TO_OBJECT_TYPE, object_type_prefix, names_seq)) \
}; \
\
BOOST_PP_SEQ_FOR_EACH(GRAPHENE_DECLARE_ID, (object_space, object_type_prefix), names_seq) \
\
} } \
FC_REFLECT_ENUM(graphene::id_namespace::BOOST_PP_CAT(object_type_prefix, object_type), \
BOOST_PP_SEQ_TRANSFORM(GRAPHENE_NAME_TO_OBJECT_TYPE, object_type_prefix, names_seq)) \
BOOST_PP_SEQ_FOR_EACH(GRAPHENE_REFLECT_ID, id_namespace, BOOST_PP_SEQ_TRANSFORM(GRAPHENE_NAME_TO_ID_TYPE, , names_seq))
#define GRAPHENE_DECLARE_ID(x, space_prefix_seq, name)
Definition: types.hpp:78
Definition: api.cpp:56
#define GRAPHENE_NAME_TO_ID_TYPE(x, y, name)
Definition: types.hpp:77
#define GRAPHENE_NAME_TO_OBJECT_TYPE(x, prefix, name)
Definition: types.hpp:76
FC_REFLECT_ENUM(graphene::net::core_message_type_enum,(trx_message_type)(block_message_type)(core_message_type_first)(item_ids_inventory_message_type)(blockchain_item_ids_inventory_message_type)(fetch_blockchain_item_ids_message_type)(fetch_items_message_type)(item_not_available_message_type)(hello_message_type)(connection_accepted_message_type)(connection_rejected_message_type)(address_request_message_type)(address_message_type)(closing_connection_message_type)(current_time_request_message_type)(current_time_reply_message_type)(check_firewall_message_type)(check_firewall_reply_message_type)(get_current_connections_request_message_type)(get_current_connections_reply_message_type)(core_message_type_last))(different_chain)(already_connected)(connected_to_self)(not_accepting_connections)(blocked)(invalid_hello_message)(client_too_old))(inbound)(outbound))(firewalled)(not_firewalled))(unable_to_connect)(connection_successful)) namespace std
#define GRAPHENE_REFLECT_ID(x, id_namespace, name)
Definition: types.hpp:81

Definition at line 83 of file types.hpp.

#define GRAPHENE_EXTERNAL_SERIALIZATION (   ext,
  type 
)
Value:
namespace fc { \
ext template void from_variant( const variant& v, type& vo, uint32_t max_depth ); \
ext template void to_variant( const type& v, variant& vo, uint32_t max_depth ); \
namespace raw { \
ext template void pack< datastream<size_t>, type >( datastream<size_t>& s, const type& tx, uint32_t _max_depth ); \
ext template void pack< sha256::encoder, type >( sha256::encoder& s, const type& tx, uint32_t _max_depth ); \
ext template void pack< datastream<char*>, type >( datastream<char*>& s, const type& tx, uint32_t _max_depth ); \
ext template void unpack< datastream<const char*>, type >( datastream<const char*>& s, type& tx, uint32_t _max_depth ); \
} }
void to_variant(const flat_set< T, A... > &var, variant &vo, uint32_t _max_depth)
Definition: flat.hpp:105
void from_variant(const variant &var, flat_set< T, A... > &vo, uint32_t _max_depth)
Definition: flat.hpp:116
Definition: api.hpp:15

Definition at line 63 of file types.hpp.

#define GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION (   type)    GRAPHENE_EXTERNAL_SERIALIZATION(/*not extern*/, type)

Definition at line 74 of file types.hpp.

#define GRAPHENE_NAME_TO_ID_TYPE (   x,
  y,
  name 
)    BOOST_PP_CAT(name, _id_type)

Definition at line 77 of file types.hpp.

#define GRAPHENE_NAME_TO_OBJECT_TYPE (   x,
  prefix,
  name 
)    BOOST_PP_CAT(prefix, BOOST_PP_CAT(name, _object_type))

Definition at line 76 of file types.hpp.

#define GRAPHENE_REFLECT_ID (   x,
  id_namespace,
  name 
)    FC_REFLECT_TYPENAME(graphene::id_namespace::name)

Definition at line 81 of file types.hpp.